Skip to content

Commit

Permalink
refactor: Update Config Variables
Browse files Browse the repository at this point in the history
Updated the variables to more accurately reflect they contain multiple vars
  • Loading branch information
techman83 committed Mar 29, 2023
1 parent 66b3304 commit 54a9591
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions netkan/netkan/webhooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ def create_app() -> NetkanWebhooks:
current_config.setup(
ssh_key=os.environ.get('SSH_KEY', ''),
secret=os.environ.get('XKAN_GHSECRET', ''),
netkan_remote=os.environ.get('NETKAN_REMOTES', ''),
ckanmeta_remote=os.environ.get('CKANMETA_REMOTES', ''),
inf_queue_name=os.environ.get('INFLATION_SQS_QUEUES', ''),
netkan_remotes=os.environ.get('NETKAN_REMOTES', ''),
ckanmeta_remotes=os.environ.get('CKANMETA_REMOTES', ''),
inf_queue_names=os.environ.get('INFLATION_SQS_QUEUES', ''),
add_queue_name=os.environ.get('ADD_SQS_QUEUE', ''),
mir_queue_name=os.environ.get('MIRROR_SQS_QUEUE', '')
)
Expand Down
10 changes: 5 additions & 5 deletions netkan/netkan/webhooks/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ class WebhooksConfig:
# import a reference to our global config object before we set
# its properties, and that requires a temporary 'empty' state.
def setup(self, ssh_key: str, secret: str,
netkan_remote: str, ckanmeta_remote: str,
inf_queue_name: str, add_queue_name: str, mir_queue_name: str) -> None:
netkan_remotes: str, ckanmeta_remotes: str,
inf_queue_names: str, add_queue_name: str, mir_queue_name: str) -> None:

self.secret = secret
self.common = SharedArgs()
self.common.ssh_key = ssh_key
self.common.ckanmeta_remotes = tuple(ckanmeta_remote.split(' '))
self.common.netkan_remotes = tuple(netkan_remote.split(' '))
self.common.inflation_queues = tuple(inf_queue_name.split(' '))
self.common.ckanmeta_remotes = tuple(ckanmeta_remotes.split(' '))
self.common.netkan_remotes = tuple(netkan_remotes.split(' '))
self.common.inflation_queues = tuple(inf_queue_names.split(' '))
self.common.deep_clone = False
self._add_queue_name = add_queue_name
self._mir_queue_name = mir_queue_name
Expand Down

0 comments on commit 54a9591

Please sign in to comment.