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.1.tar.gz
(8.1 kB
view details)
File details
Details for the file workerprocess-0.1.1.tar.gz
.
File metadata
- Download URL: workerprocess-0.1.1.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a8f95168d3c3d11d1ce2c25a58f0322174eb52c90a45e50e94d8cd98ea2bf42 |
|
MD5 | 32b6321bac8a2534820c62c90d62db2b |
|
BLAKE2b-256 | 93e9134fd92833f62d743a481dc685dd7ef10c62a298905d1d42c7ab18520cab |