-
Notifications
You must be signed in to change notification settings - Fork 25
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
FEATURE: Persist unpersisted changes in CLI after messageFinished signal #45
base: main
Are you sure you want to change the base?
Conversation
…gnal Once a `messageFinished` signal is emitted, the Persistence Manager persist all unpersisted changes. This is to have the jobmanager act as a normal CLI command, known from the a CommandController command
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sure, why not? @bwaidelich wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I shared my concerns here: #44 (comment)
I'll remove my -1 for now because I don't want to block this, but: #44 (comment)
Yeah, I guess you are not wrong in that regard. The jobqueue should be reliable about the processing of messages, and a message is processed after it finishes doing what it does, including persisting data. We should document that better and maybe create an easy way to conciously opt into this? i.e. toggle that automatic "persistAll" via a setting? Edit: See my comment in #44 (comment) - I do think we should bring the auto-persistence in line between isolated and non-isolated execution, but probably |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for today to @sorenmalling :)
For me that look pretty solid.
I'm in favor of running everything isolated instead. That will call the persistence manager as normal cli and not produce any unwanted issues from calling the persistenceManager |
Anyone have some thoughts about my suggestion in the issue? I still think that would be the better place to hook the persist call into, because otherwise you have "at most once" behaviour (work is done, message marked finished, but the persist call might still fail). It's also the same semantic as with the I'd maybe call that signal |
@albe I don't know which is better :-) My sole argument for running isolated, is that the SQL for updating the message queue (it's using the connection directly) is that, if the persistence fails, so does the updating of the jobqueue. So we will not end up with "completed" jobs, where persistence failed. I don't mind what proposal goes on - I just want users of the package not to have different experiences depending on the configuration setting :-) |
Absolutely, that's exactly why I suggest the |
Another old one that need a decision, it seems… do you people still remember your thoughts? 😎 |
Once a
messageFinished
signal is emitted, the Persistence Manager persist all unpersisted changes. This is to have the jobmanager act as a normal CLI command, known from the a CommandController commandResolves #44