The queue command
The queue command is for operating the cluster queue itself. In it's simplest invocation it's used to list all queue entries of a particular type:
$ queue typewhere type is one of the queue keywords
upload,
store, delete, remove or
replicate. Although this is a defined set query
doesn't verify that you give a valid keyword. Furthermore you can
specify a dot `.' to get all records regardless of their
type. Please notice also that althoug delete and
remove are synonyms queue doesn't know about this.
queue doesn't process queue entries in any way. It simply compares the record's keyword against the given type and prints the record if it matches.
An interesting command line option is -n. This prints the
queue filename where the listed jobs are found.
$ queue -n .prints all current jobs in the queue and the queue filenames. Since usually the filenames contain date and time when the queue file was created you can monitor when a particular job was submitted and who old it is.
The -d option removes (dequeues) the jobs identified by
type from the queue.
You may also add jobs to the cluster's queue by specifying the
-e option (enqueue).
$ queue -eadds the records found on standard input to the queue. No type parameter is expected on the command line and the program's input have to be correctly formatted queue jobs.
Queue Locks
It may not be obvious but queue creates queue locks when is dequeues entries. Listing the queue doesn't require locking, enqueuing might be discussable but the way enqueuing is implemented works reliable without. As a result constructions like
queue -d ... | the-filter-of-your-choice | queue -ework. When you work with queue you might like to add
alias dequeue='queue -d $*' alias enqueue='queue -e $*'to your .bash_profile.