A tool for creating external worker processes
Project description
Worker Process
This package provides a wrapper to create standalone worker processes.
Example Worker
Workers are created by extending the BaseWorker class and implementing a tick method to execute then calling .main() on the class. This will start an infinite loop calling that function.
The worker can be stopped gracefully by sending a SIGTERM to the process.
>>> import time ... ... from workerprocess import BaseWorker ... ... ... class ExampleWorker(BaseWorker): ... ... def tick(self): ... print 'Tick!' ... time.sleep(1) ... ... ExampleWorker.main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
workerprocess-0.1.0.tar.gz
(8.0 kB
view hashes)