Skip to main content

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


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)

Uploaded Source

File details

Details for the file workerprocess-0.1.1.tar.gz.

File metadata

File hashes

Hashes for workerprocess-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2a8f95168d3c3d11d1ce2c25a58f0322174eb52c90a45e50e94d8cd98ea2bf42
MD5 32b6321bac8a2534820c62c90d62db2b
BLAKE2b-256 93e9134fd92833f62d743a481dc685dd7ef10c62a298905d1d42c7ab18520cab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page