ensure_queue function

Make sure that a queue exists

Make sure that a queue exists

If it does not exist, then the queue will be created.

ensure_queue(name, db = default_db(), crash_strategy = "fail")

Arguments

  • name: Name of the queue. If not specified or NULL, a name is generated randomly.
  • db: Path to the database file.
  • crash_strategy: What to do with crashed jobs. The default is that they will "fail" (just like a negative acknowledgement). Another possibility is "requeue", in which case they are requeued immediately, potentially even multiple times. Alternatively it can be a number, in which case they are requeued at most the specified number of times.

Returns

The queue object.

See Also

liteq for examples

Other liteq queues: create_queue, delete_queue, list_queues

  • Maintainer: Gábor Csárdi
  • License: MIT + file LICENSE
  • Last published: 2019-03-08