Package lamson :: Module server :: Class QueueReceiver
[hide private]
[frames] | no frames]

Class QueueReceiver

source code


Rather than listen on a socket this will watch a queue directory and process messages it recieves from that. It works in almost the exact same way otherwise.

Instance Methods [hide private]
 
__init__(self, queue_dir, sleep=10, size_limit=0, oversize_dir=None)
The router should be fully configured and ready to work, the queue_dir can be a fully qualified path or relative.
source code
 
start(self, one_shot=False)
Start simply loops indefinitely sleeping and pulling messages off for processing when they are available.
source code
 
process_message(self, msg)
Exactly the same as SMTPReceiver.process_message but just designed for the queue's quirks.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, queue_dir, sleep=10, size_limit=0, oversize_dir=None)
(Constructor)

source code 

The router should be fully configured and ready to work, the queue_dir can be a fully qualified path or relative.

Overrides: object.__init__

start(self, one_shot=False)

source code 

Start simply loops indefinitely sleeping and pulling messages off for processing when they are available.

If you give one_shot=True it will run once rather than do a big while loop with a sleep.

process_message(self, msg)

source code 

Exactly the same as SMTPReceiver.process_message but just designed for the queue's quirks.