Comments (3)
That would be nice. We've done the same thing manually with #enqueue
Delayed::Job.enqueue(Delayed::PerformableMethod.new(model, :expire, []), 0, ExpireTime.from_now)
Let me think about this a little more. I'd like to come up with a way to fold this into #send_later
.
from delayed_job.
FWIW I've tried this:
def send_at(time, method, *args)
Delayed::Job.enqueue( Delayed::PerformableMethod.new(self, method.to_sym, args), 0, time)
end
I took the concept from here: http://github.com/jstorimer/delayed_job/commit/826422f440f360e0d811665ffd423c7dad92b304 but moved it into a send_at method instead, slightly different syntax than you're suggesting. Having just done this I don't have production experience with it, but it's working just fine locally
from delayed_job.
Added #send_at(time, method, *args) for queueing jobs in the future. Closed by 930fbca
from delayed_job.
Related Issues (20)
- Please document a solution to several apps sharing the same legacy database avoiding table name conflict
- Workers crash when Delayed::DeserializationError: ActiveRecord::RecordNotFound is raised HOT 1
- Support `:backend` as a `queue_attribute`
- Is it possible to write delayed_jobs.log to Logs in Openshift pod?
- deleted
- Error since ActiveSupport 7.0.3: `undefined method `silence_warnings' for Delayed::Worker:Class (NoMethodError)` HOT 2
- Upgrading from Rails 5.2.4 to 6.1.6 with Delayed Job - Job's not being picked up HOT 11
- delayed_job script and latest daemons gem HOT 2
- Worker crashes and keeps poison-pill-job in queue
- using DelayedJob results in multiple email Amazon SES HOT 1
- Delayed job failing after successful completion.
- missing __delay__ alias method in performable_mailer.rb for delay method.
- Is there a best practice for a multi-master setup? HOT 1
- DelayedJob kube containers not able to handle SIGQUITs and terminate abruptly
- Race condition but how to debug?
- Timeout doesn't halt job when max_run_time is reached HOT 1
- How does max_attempts interface with ActiveJob retry_on method? HOT 3
- Suggestion: Rake task to lauch multiple monitored workers in a container context
- Allow identifier with multiple workers HOT 7
- When shunting dj logs to their own file, the active record lines remain in the dev.log HOT 2
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 delayed_job.