Mosquito::JobRun
A JobRun is a unit of work which will be performed by a Job. JobRuns know how to:
- store and retrieve their data to and from the datastore
- figure out what Job class they match to
- build an instance of that Job class and pass off the config data
- Ask the job to run
JobRun data is called config and is persisted in the backend under the key
mosquito:job_run:job_run_id.
Constants
CONFIG_KEY_PREFIX = "job_run"
Constructors
Class methods
config_key(*parts)
The config key is the backend storage key for the metadata of this job_run.
Instance methods
build_job
Builds a Job instance from this job_run. Populates the job with config from the backend.
delete(in ttl : Int = 0)
Deletes this job_run from the backend. Optionally, after a delay in seconds (handled by the backend).
enqueue_time
Sourceid
Sourcejob
Sourcejob!
Sourceretry_count
Sourceto_s(io : IO)
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
type
Source