Uh oh!
There was an error while loading. Please reload this page.
Fix for randomized retry interval format - #624
Conversation
OCA-git-bot
commented
Feb 1, 2024
Hi @guewen, |
There was a problem hiding this comment.
Thanks for your contrib!
I guess it failed because we didn't have specific tests, right?
Any chance you add that? If you don't have time that's fine, but it's a really nice to have if you can 😉
Also, could you please rewrite the commit msg to something like:
queue_job: fix retry format with tuple values
#348 added support for randomized retry intervals.
I could not set randomized retry intervals due to the formatting checks not being updated. This should fix it.
What changes:
- includes module name
- includes the full description of the issue
Uh oh!
There was an error while loading. Please reload this page.
InigoGR
commented
Feb 1, 2024
I will add test coverage for that case and change the commit message. |
c36faf2 to
193e5fcCompareOCA#348 added support for randomized retry intervals. Configuration of randomized retry intervals is not possible due to the formatting checks not being updated. This should fix it.
193e5fc to
9b7f427CompareInigoGR
commented
Feb 5, 2024
Added some simple tests that should cover the changes in |
simahawk
left a comment
There was a problem hiding this comment.
Minor remark get a more clear exception. Pre-approving
| except ValueError: | ||
| raise exceptions.UserError( | ||
| record._retry_pattern_format_error_message() | ||
| ) | ||
| def _retry_value_type_check(self, value): | ||
| if isinstance(value, (tuple, list)): | ||
| if len(value) != 2: | ||
| raise ValueError | ||
| [self._retry_value_type_check(element) for element in value] | ||
| return | ||
| int(value) |
There was a problem hiding this comment.
| exceptValueError: | |
| raiseexceptions.UserError( | |
| record._retry_pattern_format_error_message() | |
| ) | |
| def_retry_value_type_check(self, value): | |
| ifisinstance(value, (tuple, list)): | |
| iflen(value) !=2: | |
| raiseValueError | |
| [self._retry_value_type_check(element) forelementinvalue] | |
| return | |
| int(value) | |
| exceptValueErrorasexc: | |
| raiseexceptions.UserError( | |
| record._retry_pattern_format_error_message() | |
| )fromexc | |
| def_retry_value_type_check(self, value): | |
| ifisinstance(value, (tuple, list)): | |
| iflen(value) !=2: | |
| raiseValueError("Random retry pattern must be a tuple with 2 digits") | |
| [self._retry_value_type_check(element) forelementinvalue] | |
| return | |
| int(value) |
OCA-git-bot
commented
Mar 8, 2024
This PR has the |
dreispt
commented
May 2, 2024
@simahawk Is this good to merge? |
dreispt
commented
May 18, 2024
/ocabot merge patch |
OCA-git-bot
commented
May 18, 2024
On my way to merge this fine PR! |
OCA-git-bot
commented
May 18, 2024
Congratulations, your PR was merged at cf35a44. Thanks a lot for contributing to OCA. ❤️ |
queue_job: fix retry format with tuple values
#348 added support for randomized retry intervals.
I could not set randomized retry intervals due to the formatting checks not being updated. This should fix it.