Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor locks.py #631

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open

Refactor locks.py #631

wants to merge 1 commit into from

Conversation

cvicentiu
Copy link
Member

  1. Introduce a new yml file that stores worker locks counts.
  2. Remove redundant and inconsistent naming between lock name and worker name.

NOTE: I HAVE NOT TESTED THIS PR.

@cvicentiu cvicentiu force-pushed the refactor-2 branch 4 times, most recently from 7b8f1a6 to 53168b9 Compare November 26, 2024 07:32
1. Introduce a new yml file that stores worker locks counts.
2. Remove redundant and inconsistent naming between lock name and worker
   name.
# TODO: re-evaluate if this is the right place after multi-master
# is refactored to use a single base master.cfg.
with open(
os.path.join(os.path.dirname(os.path.realpath(__file__)), "worker_locks.yaml"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvicentiu Why not keep the locks in constants, like every constant?
So we avoid any additional files that hold constant values.

WORKER_LOCKS = {
    "hz-bbw1-docker": 9,
    "hz-bbw2-docker": 1,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants