Comments (7)
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.
from que.
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?
from que.
We've dropped support for job options supplied as top-level keywords, but ActiveJob's QueAdapter still uses them. So we have to move them into the job_options hash ourselves.
I looked into this. The manual construction of job_options
was only in edge Rails for 6 months (rails/rails#44734 until rails/rails#46005 / 2022-03-22 – 2022-09-13), with both merge commits showing a Git tag of v7.1.0.beta1
, so given that, I read that it never made it into the v7.1.0
release. However, it was backported to 7-0-stable
, and it's still present there, so I gathered that it was released in a v7.0.x, and yes, it was released in v7.0.4.
So. We can't just assume it's safe to change the handling of job_options
in Que's ActiveJob extensions.
from que.
I've not used tags before, nor have I ever been clear on their purpose.
for example synchronization produces some amount of jobs. I mark them with tag and get synchronization progress.
Is there a reason you can't have your tags be a job kwarg
I think I can. It would just require some refactoring
Wanted your opinion before starting to refactor.
Thank you for a quick response 🙏
from que.
We could add tags
as another top-level kwarg. It would be consistent to do that, given the other job_options
are configured at that level - priority
, queue
, and run_at
(although run_at
is set via wait_until
... or it was, but maybe that mapping's been lost now the Que adapter's been removed from ActiveJob... =S ). But that could be a breaking change for systems using Que that have a job kwarg called tags
.
from que.
Another option that would allow you to keep using tags
would be to insert that job using Que.enqueue
. To keep compatibility with ActiveJob, just ensure you're doing it such that the resulting row inserted into the que_jobs
table is the same as it would've been if it were enqueued using ActiveJob (other than the tags).
from que.
I'm going to reopen and rename the issue so it can remain tracked
from que.
Related Issues (20)
- Timeline for v2.0.0. release HOT 1
- Remove unnecessary trigger that notifies about job state transitions HOT 2
- Deprecated method used in connection.rb HOT 1
- Check that all que migrations have been applied at startup HOT 1
- Detect Que schema version missing due to bug in Rails schema dump - affects all versions of Rails 7 prior to 7.0.3
- Migration to v. 2.2.0 failed HOT 2
- Stats about failing jobs HOT 2
- upgrading from v0 to v2 when already on ruby 3 HOT 5
- Migrating from 1.0.0.beta4 to 1.4.1 HOT 5
- Que fails to calculate args and kwargs on Ruby 3.2 with ActiveJob HOT 1
- Migration fails when adding Que to a new project (with rspec) HOT 8
- Proposal to change run_at default to clock_timestamp HOT 2
- ActiveRecord connection returned to the pool prematurely when nesting que jobs
- Tests are failing due to Bundler requiring Ruby 3 HOT 2
- PQsocket() can't get socket descriptor (PG::ConnectionBad) locker error HOT 3
- ActiveSupport::CurrentAttributes gets reset in console HOT 5
- All symbols, passed to the Job.run are transformed to strings HOT 2
- Deprecation warning with Rails 7.1 HOT 5
- Job arg Symbol conversion is complicated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from que.