1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Raise exception for scheduling jobs in the inline adapter

This commit is contained in:
Cristian Bica 2014-06-03 01:04:08 +03:00
parent 8a3b137f95
commit eaacb88fcb

View file

@ -6,16 +6,8 @@ module ActiveJob
job.new.execute *args
end
def enqueue_at(job, timestamp, *args)
Thread.new do
begin
interval = Time.now.to_f - timestamp
sleep(interval) if interval > 0
job.new.execute *args
rescue => e
ActiveJob::Base.logger.info "Error performing #{job}: #{e.message}"
end
end
def enqueue_at(*)
raise NotImplementedError.new("Use a queueing backend to enqueue jobs in the future. Read more at https://github.com/rails/activejob")
end
end
end