Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions server/demo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,9 @@

# Specify the timezone in the time output
#timezone = True

# The username to use when creating channels in channelfinder
#username = cfstore

# The env variable to use for the owner field when creating channels in channelfinder
#env_owner_variable = ENGINEER
3 changes: 2 additions & 1 deletion server/recceiver/cfstore.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class CFConfig:
clean_on_start: bool = True
clean_on_stop: bool = True
username: str = "cfstore"
env_owner_variable: str = "ENGINEER"
recceiver_id: str = RECCEIVERID_DEFAULT
timezone: Optional[str] = None
cf_query_limit: int = DEFAULT_QUERY_LIMIT
Expand Down Expand Up @@ -552,7 +553,7 @@ def _commit_with_thread(self, transaction: CommitTransaction):
ioc_name=transaction.client_infos.get("IOCNAME") or str(transaction.source_address.port),
ioc_IP=transaction.source_address.host,
owner=(
transaction.client_infos.get("ENGINEER")
transaction.client_infos.get(self.cf_config.env_owner_variable)
or transaction.client_infos.get("CF_USERNAME")
or self.cf_config.username
),
Expand Down
6 changes: 6 additions & 0 deletions server/recceiver_full.conf
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ environment_vars=ENGINEER:Engineer,EPICS_BASE:EpicsVersion,PWD:WorkingDirectory
# Specify the timezone in the time output
timezone = True

# The username to use when creating channels in channelfinder
username = cfstore

# The env variable to use for the owner field when creating channels in channelfinder
env_owner_variable = ENGINEER

# The channelFinder client is configuration information is
# stored in /etc/channelfinderapi.conf as described in the client
# Can be configured to be this file, like so:
Expand Down
Loading