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 details)
File details
Details for the file workerprocess-0.1.0.tar.gz
.
File metadata
- Download URL: workerprocess-0.1.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eac8bcf837a5cb040ebd898179b1916c32ccce2f972c6d6d0fe99bba6f0dd33 |
|
MD5 | e73cdade35ffcf06c5bd3b564262daaf |
|
BLAKE2b-256 | c45c3e168e5143ca0db75a39509a88ef052ce0ab336dd2c90df688e8f15d58b1 |