Sha256: 1d598d0d960ceb69a5cdeae3453fd2e66e4dd03fe5495e330f24b025857b9757
Contents?: true
Size: 445 Bytes
Versions: 1
Compression:
Stored size: 445 Bytes
Contents
# frozen_string_literal: true require 'json' require 'uri' module Quiq class Client def push(job, scheduled_at) serialized_job = JSON.dump(job.serialize) if scheduled_at Async { Scheduler.enqueue_at(serialized_job, scheduled_at) } else Async { Queue.push(job.queue_name, serialized_job) } end end def self.push(job, scheduled_at: nil) new.push(job, scheduled_at) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quiq-0.2.0 | lib/quiq/client.rb |