Class: Exekutor::Queue
- Inherits:
-
Object
- Object
- Exekutor::Queue
- Defined in:
- lib/exekutor/queue.rb
Overview
The job queue
Direct Known Subclasses
Defined Under Namespace
Classes: Error
Constant Summary collapse
- VALID_PRIORITIES =
Valid range for job priority
(1..32_767).freeze
- MAX_NAME_LENGTH =
Maximum length for the queue name
63
Instance Method Summary collapse
-
#push(jobs) ⇒ Integer
Adds a job to the queue, scheduled to perform immediately.
-
#schedule_at(jobs, timestamp) ⇒ Integer
Adds a job to the queue, scheduled to be performed at the indicated time.
Instance Method Details
#push(jobs) ⇒ Integer
Adds a job to the queue, scheduled to perform immediately
22 23 24 |
# File 'lib/exekutor/queue.rb', line 22 def push(jobs) create_records Array.wrap(jobs) end |
#schedule_at(jobs, timestamp) ⇒ Integer
Adds a job to the queue, scheduled to be performed at the indicated time
30 31 32 |
# File 'lib/exekutor/queue.rb', line 30 def schedule_at(jobs, ) create_records(Array.wrap(jobs), scheduled_at: ) end |