Struct json_job_dispatch::Director[][src]

pub struct Director<'a> { /* fields omitted */ }

Dispatch jobs to registered handlers.

Jobs are sorted into accept, reject, and fail directories based on whether they were accepted by the relevant handler. Once handled, a .stamp file containing the timestamp of when the job was completed is created beside the final location. In addition, rejected and failed jobs have a .reason file describing what happened.

Methods

impl<'a> Director<'a>
[src]

Creates a new Director.

The accept and reject directories are created as children of the given directory.

Add a handler for jobs labeled as kind.

Handle a single file.

Returns true if the loop should terminate.

Handle a batch of files at once.

Returns true if the loop should terminate.

Watch a directory for new job files and act upon them.

Upon startup, this searches the directory for existing files. These files are processed in lexigraphic order.

Trait Implementations

impl<'a> Debug for Director<'a>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<'a> !Send for Director<'a>

impl<'a> !Sync for Director<'a>