-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add method subscribe_to #252
Conversation
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.
@WaYdotNET
I tried to go around it to have subscribe
that can be used both as a decorator and as a normal function (like it is today). But I think your approach (@subscribe_to
vs. subscribe
) is correct, better, and makes more sense, especially from a user perspective.
In the end, having this _to
makes it more readable.
Thanks!
Tell me if you need more help :)
…prevent unnecessary conversions by ensuring the Callable typing for the task is derived directly from task input. The function now immediately verifies if the existing function is an instance of Task. If not, it would convert the function into a Task instance. This modification simplifies the code and enhances execution efficiency.
… module Expanded unit test coverage in test_pubsub.py with methods test_8 to test_11 to validate the functionality and expected results for the publish method with different parameters. Refactored job fixture methods in conftest.py to increase code readability. Now, the Callable typing for each 'job' is directly derived from the task input, enhancing code execution efficiency. New job fixtures (job_h to job_m) have also been added for additional testing purposes.
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.
It's getting very close :)
Next step would be:
- Update the
README.md
to add this new@
in the examples / docs. - And the changelog in the
README.md
Hey @WaYdotNET ! I'll still need to do some cleanup on this at some point. As the style that has accumulated over the years is a bit outdated. |
…ntz#261) * ci: Change the GitHub Actions trigger Now, it will run tests for every pull request made to the `master` branch, as well as when merges are pushed to `master`. * Drop support for Celery 3 Celery 3 depends on `use_2to3` which is no longer supported by any of the latest patch versions of CPython and Pypy, for >= 3.7. The CI for Celery 3 was not able to run on any Python provided by GitHub Actions. It is time to fully decommission it.
remove Celery 3 info and add subscribe_to examples
# Conflicts: # .github/workflows/build.yml # README.md # tests/conftest.py
@Mulugruntz missing |
Can you rebase? And also drop 5d92a26. I'll do the version bump and tag and publish later, all at once. |
ci: Move CodeClimate ID from secrets to vars (Mulugruntz#267)
some issue |
Can you try again? |
Great!! it work well |
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.
Looks good to me! 🚀
Idea based from #236
I added a method that allows you to directly register a function that will then be "converted" to a celery task and will be automatically added to the topic so that you can improve the devX