Skip to content

[14.0] queue_job: use parent channel if configured - #412

Merged
OCA-git-bot merged 2 commits into
OCA:14.0from
camptocamp:14-channel-parent-fallback
Mar 14, 2022
Merged

[14.0] queue_job: use parent channel if configured#412
OCA-git-bot merged 2 commits into
OCA:14.0from
camptocamp:14-channel-parent-fallback

Conversation

@simahawk

@simahawksimahawk commented Mar 11, 2022

Copy link
Copy Markdown
Contributor

Use case:

  • you have a root channel per scope/app (eg: root.edi)
  • you have several sub channels (eg: root.edi.ubl.sales,
    root.edi.gs1.delivery)
  • you want to configure capacity only for the main channel "root.edi"

Before this change, the channel manager falls back on root channel,
and you get flooded w/ warning log entries like "unknown channel....".

However, if you have a specific parent channel configured
it sounds a good idea to use it.

NOTE: using parent_fallback flag is just an attempt to not break places where this feat is not desiderable.
Also, I might fail to see why this behavior was not supported before: any remark is welcomed :)

@guewen can I have your insights please? 🙏

Comment threadqueue_job/jobrunner/channels.py
Comment threadqueue_job/jobrunner/channels.py

@guewenguewen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This behavior is exactly the one I would expect in all situations.
Thanks!

@flothoflotho left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Use case:
* you have a root channel per scope/app (eg: root.edi)
* you have several sub channels (eg: root.edi.ubl.sales,
root.edi.gs1.delivery)
* you want to configure capacity only for the main channel "root.edi"
Before this change, the channel manager falls back on root channel.
However, if you have a specific parent channel configured
it sounds a good idea to use it.
@simahawk
simahawkforce-pushed the 14-channel-parent-fallback branch from 6739c3d to 96c9d9bCompareMarch 11, 2022 16:35
@simahawk

Copy link
Copy Markdown
ContributorAuthor

This behavior is exactly the one I would expect in all situations. Thanks!

Cool. I've just dropped the try/except as it's useless now.

Contributing since a while... :)
@simahawk

Copy link
Copy Markdown
ContributorAuthor

/ocabot merge minor

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 14.0-ocabot-merge-pr-412-by-simahawk-bump-minor, awaiting test results.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 43cdb78. Thanks a lot for contributing to OCA. ❤️

@ivantodorovich
ivantodorovich deleted the 14-channel-parent-fallback branch March 14, 2022 12:39
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@simahawk@OCA-git-bot@guewen@flotho@sebalix