-
Notifications
You must be signed in to change notification settings - Fork 190
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
Doesn't support enqueueing a job with tags using ActiveJob #399
Comments
Hmm, I'm afraid not! que/lib/que/active_job/extensions.rb Lines 62 to 70 in 9744019
I'll have a quick look into how tags support could be added. |
I've not used tags before, nor have I ever been clear on their purpose. Is there a reason you can't have your tags be a job kwarg? |
I looked into this. The manual construction of So. We can't just assume it's safe to change the handling of |
for example synchronization produces some amount of jobs. I mark them with tag and get synchronization progress.
I think I can. It would just require some refactoring Wanted your opinion before starting to refactor. |
We could add |
Another option that would allow you to keep using |
I'm going to reopen and rename the issue so it can remain tracked |
…equire_job_options_kwarg? We don't need to support old versions of Que in the adapter anymore! Que's codebase always uses the latest Que =P I considered removing & inlining Que::ActiveJob::WrapperExtensions::ClassMethods#enqueue into our Rails 7.1+ QueAdapter, but it still needs to exist in place for support for older versions of Rails =\ Keeping it in place conditionally based on the Rails version would be [a bit complex](#399 (comment)), and so perhaps not an improvement.
…equire_job_options_kwarg? We don't need to support old versions of Que in the adapter anymore! Que's codebase always uses the latest Que =P I considered removing & inlining Que::ActiveJob::WrapperExtensions::ClassMethods#enqueue into our Rails 7.1+ QueAdapter, but it still needs to exist in place for support for older versions of Rails =\ Keeping it in place conditionally based on the Rails version would be [a bit complex](que-rb#399 (comment)), and so perhaps not an improvement.
Tags work:
ChargeCreditCard.enqueue(card.id, user_id: current_user.id, job_options: { tags: ["hello"] })
Tags don't work:
ChargeCreditCard.perform_later(card.id, user_id: current_user.id, job_options: { tags: ["hello"] })
Maybe I miss something?
The text was updated successfully, but these errors were encountered: