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.0.tar.gz (8.0 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for workerprocess-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1eac8bcf837a5cb040ebd898179b1916c32ccce2f972c6d6d0fe99bba6f0dd33
MD5 e73cdade35ffcf06c5bd3b564262daaf
BLAKE2b-256 c45c3e168e5143ca0db75a39509a88ef052ce0ab336dd2c90df688e8f15d58b1

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