Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

A really simple job queue. Uses a rudimentary event loop and runs tasks in subprocesses (managed with signalfd). Doesn't support task arguments. Task results are rudimentary (only succcess or failure with exit code). When multiple requests are made for the same task they are collapsed into a single request.

Project description

A really simple job queue. Uses a rudimentary event loop and runs tasks in subprocesses (managed with signalfd). Doesn’t support task arguments. Task results are rudimentary (only succcess or failure with exit code). When multiple requests are made for the same task they are collapsed into a single request.

  • Free software: BSD 2-Clause License

Installation

pip install stampede

Documentation

To use the project:

import stampede


class MyWorker(StampedeWorker):

    def handle_task(self, name):
        print("Perfoming work for task:", name)

Development

To run the all tests run:

tox

Changelog

2.0.0 (2018-12-17)

  • Use more robust collection of child exit codes. Turns out that if there’s enough pressure of the signalfd is fills up and needs extra os.waitpid() calls to collect the orphans.
  • Add a request API (stampede.request).
  • Add a request API that also spawns the daemon if not running (stampede.request_and_spawn).
  • Changed do_work to handle_task in StampedeWorker. BACKWARDS INCOMPATIBLE
  • Update test grid to include Python 3.7 and PyPy3.
  • Changed how results are passed to the client (JSON instead of some crappy custom text format).

1.0.0 (2015-10-19)

0.0.1 (2013-10-30)

  • ?

0.0.1 (2013-10-28)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for stampede, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size stampede-2.0.0-py2.py3-none-any.whl (8.5 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size stampede-2.0.0.tar.gz (16.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page