Skip to content

Conversation

@simahawk
Copy link
Contributor

@simahawk simahawk commented Sep 3, 2024

Current situation:

  • multiple keys for no good reason
  • half baked: not all of them used everywhere
  • no centralization
  • poor naming

With this change we'll have:

  • 1 and only one key to disable via ctx: queue_job__no_delay
  • 1 and only one key to disable via os env: QUEUE_JOB__NO_DELAY
  • backward compatibility with deprecation for old keys

Backport of #521

Current situation:

* multiple keys for no good reason
* half baked: not all of them used everywhere
* no centralization
* poor naming

With this change we'll have:

* 1 and only one key to disable via ctx: ``queue_job__no_delay``
* 1 and only one key to disable via os env: ``QUEUE_JOB__NO_DELAY``
* backward compatibility with deprecation for old keys
@OCA-git-bot
Copy link
Contributor

Hi @guewen,
some modules you are maintaining are being modified, check this out!

deprecated_keys = ("_job_force_sync", "test_queue_job_no_delay")
for key in deprecated_keys:
if env.context.get(key):
_logger.warning(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

NOTE: the warning here is the same we had already + the deprecation message.

Copy link
Member

@amh-mw amh-mw left a comment

Choose a reason for hiding this comment

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

LGTM

@simahawk
Copy link
Contributor Author

simahawk commented Sep 4, 2024

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit 03ca33d into OCA:14.0 Sep 4, 2024
@OCA-git-bot
Copy link
Contributor

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

Sign up for free to 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.

3 participants