TaskBunny v0.0.1-dev.6 TaskBunny.JobRunner
JobRunner wraps up job execution and provides you abilities:
- invoking jobs concurrently (unblocking job execution)
- handling a job crashing
- handling timeout
Signal
Once the job has finished it sends a message with a tuple consisted with:
- atom indicating message type: :job_finished
- result: :ok or {:error, details}
- meta: meta data for the job
After sending the messsage, JobRunner shuts down all processes it started.
Summary
Functions
Invokes the given job with the given payload
Functions
Invokes the given job with the given payload.
The job is run in a seperate process, which is killed after the job.timeout if the job has not finished yet. A :error message is send to the :job_finished of the caller if the job times out.