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

Make the current Locker instance available via Que.locker #380

Merged
merged 1 commit into from
Sep 1, 2022

Conversation

mnbbrown
Copy link
Contributor

@mnbbrown mnbbrown commented Aug 31, 2022

This makes the current running Locker instance accessible externally. This allows other code to inspect the state of the running locker, its workers and associated threads.

See #366 (comment) for more context.

Copy link
Member

@ZimbiX ZimbiX left a comment

Choose a reason for hiding this comment

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

Looks good otherwise! =)

@@ -71,6 +75,11 @@ def initialize(
Que.assert Array, worker_priorities
worker_priorities.each { |p| Que.assert([Integer, NilClass], p) }

# We assign this globally because we only ever expect on locker to be
Copy link
Member

Choose a reason for hiding this comment

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

*one locker

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How did I miss that :O fixed now :)

This allows users of Que to access the current Locker instance to
inspect it's state.
@ZimbiX ZimbiX merged commit b138b29 into que-rb:master Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants