Skip to content

Commit

Permalink
Merge pull request #121 from lsst-ts/tickets/LOVE-45
Browse files Browse the repository at this point in the history
Document LOVE-producer configuration
  • Loading branch information
sebastian-aranda authored Jun 23, 2021
2 parents d58a188 + 14f23db commit af7e4d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ All these variables are initialized with default variables defined in :code:`.en
- `DB_HOST`: defines the host of the Database. Only used if `DB_ENGINE=postgresql`.
- `DB_PORT`: defines the port of the Database. Only used if `DB_ENGINE=postgresql`.
- `NO_DEBUG`: defines wether or not the LOVE-.manager will be run using Django's debug mode. If the variable is defined, then Debug mode will be off.
- `LOVE_PRODUCER_LEGACY`: defines wether or not ussing the legacy LOVE-producer version. If the variable is defined, then the CSC Client won't be used and the legacy version will.
- `SECRET_KEY`: overrides Django's SECRET_KEY, if not defined the default value (public in this repo) will be used.
- `AUTH_LDAP_SERVER_URI`: (deprecated) the location of the LDAP authentication server. No LDAP server is used if this variable is empty

Expand Down
6 changes: 3 additions & 3 deletions manager/manager/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,6 @@
TRACE_TIMESTAMPS = False


# LOVE-CSC-PRODUCER
"""Defines wether or not ussing the new LOVE-producer version, i.e. LOVE CSC Producer"""
LOVE_CSC_PRODUCER = os.environ.get("LOVE_CSC_PRODUCER", False)
# LOVE-PRODUCER-CONFIGURATION
"""Defines wether or not ussing the legacy LOVE-producer version, i.e. not the LOVE CSC Producer"""
LOVE_PRODUCER_LEGACY = os.environ.get("LOVE_PRODUCER_LEGACY", False)
2 changes: 1 addition & 1 deletion manager/subscription/consumers.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ async def _join_group(self, category, csc, salindex, stream):

# If subscribing to an event, send the initial_state
if category == "event":
csc_group_key = csc if settings.LOVE_CSC_PRODUCER else "all"
csc_group_key = csc if not settings.LOVE_PRODUCER_LEGACY else "all"
await self.channel_layer.group_send(
f"initial_state-{csc_group_key}-all-all",
{
Expand Down

0 comments on commit af7e4d9

Please sign in to comment.