-
Notifications
You must be signed in to change notification settings - Fork 6
Implement database listeners and make database notify on jobs change #879
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
Draft
ylei-tsubame
wants to merge
47
commits into
ClusterLabs:main
Choose a base branch
from
ylei-tsubame:issues/801-event-driven-jobs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Implement database listeners and make database notify on jobs change #879
ylei-tsubame
wants to merge
47
commits into
ClusterLabs:main
from
ylei-tsubame:issues/801-event-driven-jobs
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
retest this please |
retest this please |
2 similar comments
retest this please |
retest this please |
0fc0b17
to
b7143c6
Compare
digimer
previously approved these changes
Apr 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the foundation work for #801.
Changes:
anvil-daemon
will react to notify calls triggered by the jobs table.anvil-access-module
will use Proc::Simple as a replacement forfork()
to keep the code base cleaner.Additional thoughts:
The functions provided inanvil-access-module
to manage database listeners may not be needed since the listener-related logic was moved to the database perl module. But it's kept in place for convenience.If more control is required, try using the methods directly with JSON as parameters, like:x Database->add_listener '{"param1":"value1",...}'
Got confused, ^ is actually required. Can't write perl subroutines in javascript.
Update 1:
Some changes broke the communication between the
striker-ui-api
and its childanvil-access-module
. Added a transitional patch which will be changed in the next PR.Update 2:
Removed patch from update 1 because it's not actually solving the problem. The communication between
striker-ui-api
and its childanvil-access-module
will still break (or mismatch) sometimes. Logs showDBI::dbh->clone()
is stuck and causes the response to never be sent.Update 3:
Made a log enhancement for update 2, which shouldn't have fixed the problem in update 2, but I'm having trouble reproducing the problem now... 😭
Update 4:
The problem from update 2 persists; although not always reproducible. It may be caused by the listeners' high-res sleep?