Repository navigation
fix(background_tasks): keep tenant publish validation on custom task bases (#765) - #796
Merged
Merged
Conversation
…tenant task bases to tenant_celery.py Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
Forward only Celery 5.4-compatible arguments; keep the custom base's module and qualname. Claude-Session: https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4
…tom-base # Conflicts: # CHANGELOG.md
Deploying simple-module-python with
|
| Latest commit: |
7713ded
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://89215c08.simple-module-python.pages.dev |
| Branch Preview URL: | https://feat-b49-bg-tasks-custom-bas.simple-module-python.pages.dev |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…tom-base # Conflicts: # CHANGELOG.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
apply_asyncnow lives inTenantPublishMixin.TenantCelery._task_from_funcomposes that mixin in front of any custom task base (@app.task(base=Custom),shared_task(base=Custom)). Eager runs on a custom base therefore refuse a mismatched tenant header and stamp the caller's tenant and owner, the same as the defaultTenantTaskand broker mode.apply_asyncstill runs once, after validation.TypeErrornaming it at registration.celery>=5.4floor still works.TenantTask,TenantPublishMixinandTenantCelerymoved tobackground_tasks/tenant_celery.py, which keepscelery_app.pyunder the 300-line cap.docs/modules/background_tasks.md) and CHANGELOG are updated.Closes #765
Review
/ship pipeline: correctness and maintainability review (Sonnet), triage. Fixed:
tyinvalid override;__module__and__qualname__;__all__re-export;Verification
make lint: passes.make test-py: 7251 passed. Two local failures were environmental:/tmp/.gitsandbox placeholder;test_eager_publish_from_a_plain_session_is_deliveredtimed out its 15 s wait while the machine was under load. It passes alone and in a parallel run of the module (625 passed).https://claude.ai/code/session_01M9neheZZEe3sVpDi2S3zT4