-
-
Notifications
You must be signed in to change notification settings - Fork 536
[17.0][IMP]queue_job: only subscribe job creator if indicated via boolean method #865
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
[17.0][IMP]queue_job: only subscribe job creator if indicated via boolean method #865
Conversation
|
Hi @guewen, |
53b1975 to
f35df77
Compare
|
hi @guewen, any chance you see this a good improvement to the module? |
|
@GuillemCForgeFlow why is it not sufficient for you to override |
@sbidoul, the problem is that the user assigned to the job will always be added anyway: https://github.com/OCA/queue/blob/17.0/queue_job/models/queue_job.py#L359. There may be cases for which we don't want that to happen. |
Ah yes. How about this? def _subscribe_job_creator(self) -> bool
"""Whether the user that created the job should be subscribed to the job, in addition to users determined by `_subscribe_users_domain`""" |
…ethod We add the `_subscribe_job_creator` method in `queue.job` which will return True for the cases where we want to subscribe the job creator, False otherwise.
f35df77 to
5487166
Compare
|
@sbidoul changes applied, thank you for the feedback 🙂 👍🏿 |
|
hi @guewen, I'd appreciate it if you have the time to review this small improvement 🙂 |
guewen
left a comment
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
|
@sbidoul perhaps we can get this merged? I'll take care of the fws 👌🏿 |
|
/ocabot merge patch Thanks! |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at 1acf4c1. Thanks a lot for contributing to OCA. ❤️ |
We add the
_subscribe_job_creatormethod inqueue.jobwhich will return True for the cases where we want to subscribe the job creator, False otherwise.cc @ForgeFlow