Skip to content

Commit

Permalink
Add mutex lock file path to registry CLI wrapper class (#958)
Browse files Browse the repository at this point in the history
Part of [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75)
Follows https://git.vdb.to/cerc-io/stack-orchestrator/pulls/957

Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/958
Reviewed-by: ashwin <[email protected]>
Co-authored-by: Prathamesh Musale <[email protected]>
Co-committed-by: Prathamesh Musale <[email protected]>
  • Loading branch information
prathamesh0 authored and ashwin committed Oct 28, 2024
1 parent 4a7df2d commit 5f8e809
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion stack_orchestrator/deploy/webapp/registry_mutex.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def decorator(func):
@wraps(func)
def wrapper(self, *args, **kwargs):
lock_file_path = DEFAULT_LOCK_FILE_PATH
if self.mutex_lock_file is not None:
if self.mutex_lock_file:
lock_file_path = self.mutex_lock_file

with open(lock_file_path, 'w') as lock_file:
Expand Down
3 changes: 2 additions & 1 deletion stack_orchestrator/deploy/webapp/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,10 @@ def is_id(name_or_id: str):


class LaconicRegistryClient:
def __init__(self, config_file, log_file=None):
def __init__(self, config_file, log_file=None, mutex_lock_file=None):
self.config_file = config_file
self.log_file = log_file
self.mutex_lock_file = mutex_lock_file
self.cache = AttrDict(
{
"name_or_id": {},
Expand Down

0 comments on commit 5f8e809

Please sign in to comment.