Struct disque::AddJobBuilder [] [src]

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

Helper to add a new job

Examples


let disque = Disque::open("redis://127.0.0.1:7711/").unwrap();
let jobid = AddJobBuilder::new(b"example queue", b"my job", 10000
    ).delay(1440).run(&disque).unwrap();

Methods

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

Creates a new builder for queue_name. Timeout is specified in milliseconds.

Changes the queue name where the job will be added.

Changes the job body.

Changes the timeout. It must be specified in milliseconds.

The number of nodes the job should be replicated to.

The number of seconds that should elapse before the job is queued.

Period after which, if no ACK is received, the job is put again into the queue for delivery

The max job life in seconds. After this time, the job is deleted even if it was not successfully delivered.

If there are already count messages queued for the specified queue name, the message is refused and an error reported to the client.

If true, asks the server to let the command return ASAP and replicate the job to other nodes in the background. Otherwise, the job is put into the queue only when the client gets a positive reply.

Executes the addjob command.