| Home | Trees | Indices | Help |
|
|---|
|
|
Provides a simplified API for dealing with 'queues' in Lamson. It currently just supports maildir queues since those are the most robust, but could implement others later.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
This gives the Maildir queue directory to use, and whether you want this Queue to use the SafeMaildir variant which hashes the hostname so you can expose it publicly. The pop_limit and oversize_queue both set a upper limit on the mail you pop out of the queue. The size is checked before any Lamson processing is done and is based on the size of the file on disk. The purpose is to prevent people from sending 10MB attachments. If a message is over the pop_limit then it is placed into the oversize_dir (which should be a maildir). The oversize protection only works on pop messages off, not putting them in, get, or any other call. If you use get you can use self.oversize to also check if it's oversize manually.
|
Pushes the message onto the queue. Remember the order is probably not maintained. It returns the key that gets created. |
Pops a message off the queue, order is not really maintained like a stack. It returns a (key, message) tuple for that item. |
Get the specific message referenced by the key. The message is NOT removed from the queue. |
Removes the queue, but not returned. |
Returns the number of messages in the queue. |
Clears out the contents of the entire queue. Warning: This could be horribly inefficient since it basically pops until the queue is empty. |
Returns the keys in the queue. |
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Wed Jul 7 07:32:52 2010 | http://epydoc.sourceforge.net |