salt.queues.sqlite_queue module

2014.7.0 新版功能.

This is the default local master event queue built on sqlite. By default, an sqlite3 database file is created in the sqlite_queue_dir which is found at:

/var/cache/salt/master/queues

It's possible to store the sqlite3 database files by setting sqlite_queue_dir to another location:

sqlite_queue_dir: /home/myuser/salt/master/queues
salt.queues.sqlite_queue.delete(queue, items)

Delete an item or items from a queue

salt.queues.sqlite_queue.insert(queue, items)

Add an item or items to a queue

salt.queues.sqlite_queue.list_items(queue)

List contents of a queue

salt.queues.sqlite_queue.list_length(queue)

Provide the number of items in a queue

salt.queues.sqlite_queue.list_queues()

Return a list of Salt Queues on the Salt Master

salt.queues.sqlite_queue.pop(queue, quantity=1)

Pop one or more or all items from the queue return them.