diff options
author | Cristian Bica <cristian.bica@gmail.com> | 2014-08-24 15:29:20 +0300 |
---|---|---|
committer | Cristian Bica <cristian.bica@gmail.com> | 2014-09-02 14:35:53 +0300 |
commit | 5255e4f39f040be28b56740f3ebef667f286926c (patch) | |
tree | 35473fee32b07e99ebed6a8f6504e5f03e1b2073 /activejob/test/support | |
parent | 368001c0218dbe9a5851ea1b804fdd9d7c0ba45f (diff) | |
download | rails-5255e4f39f040be28b56740f3ebef667f286926c.tar.gz rails-5255e4f39f040be28b56740f3ebef667f286926c.tar.bz2 rails-5255e4f39f040be28b56740f3ebef667f286926c.zip |
ActiveJob: Implemented enqueue_at for QueueClassic
Diffstat (limited to 'activejob/test/support')
-rw-r--r-- | activejob/test/support/queue_classic/inline.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activejob/test/support/queue_classic/inline.rb b/activejob/test/support/queue_classic/inline.rb index 5e9c295e01..5743d5bbb5 100644 --- a/activejob/test/support/queue_classic/inline.rb +++ b/activejob/test/support/queue_classic/inline.rb @@ -7,5 +7,17 @@ module QC receiver = eval(receiver_str) receiver.send(message, *args) end + + def enqueue_in(seconds, method, *args) + receiver_str, _, message = method.rpartition('.') + receiver = eval(receiver_str) + receiver.send(message, *args) + end + + def enqueue_at(not_before, method, *args) + receiver_str, _, message = method.rpartition('.') + receiver = eval(receiver_str) + receiver.send(message, *args) + end end end |