Skip to main content

Simple scheduling WSGI middleware.

Project description

Scheduling WSGI Middleware
============================

This package acts as a WSGI scheduling engine, the middleware can be configured
to request web contexts at given intervals. A user may then, within their application,
configure the web contexts to perform scheduled tasks e.g. maintainence.

The middleware for pulse is provided in pulse.middleware:PulseMiddleware and a paste
filter_app_factory is also provided.

Configuration
-----------------
Pulse can be configured in two ways. The Middleware takes keyword configuration
arguments when constructed,or alternatively a config dictionary
allowing it to be configured by paste.
If using pastes the pulse configuration options take the form of:
pulse.config.$configoption.

Currently only one configuration option is supported:
* context - This is the base web context that tasks are sent to,
tasks are dispatched to /$context/$action, unless action is an absolute
path.
* mode - This specifies the multiprocessing mode, the default is 'theading',
if running python2.6 the 'processing' option is also available.
* guard - If True the pulse middleware prevents any pulse managed contexts
from being accessed extenally, the default is False.

Tasks
------
Each task defines at an interval and a web context, pulse will request
the specified web context every interval seconds.

Creating A Task
~~~~~~~~~~~~~~~~
A new task is created by specifying configuration options, each option takes the form:
pulse.task.$taskname.$option

The following task configuration options are available:
* interval - The interval between task dispatching.
* action - The action to dispatch to: see pulse.config.context

Tasks can also be programmatically configured by passing a dictionary of
<taskname, TaskObject> into PulseMiddleware's task keyword argument.

Example
========

To request the following context '/sessions/cleanup' every 5 minutes, the following
paste configuration could be used:

pulse.config.context = sessions

pulse.task.cleanup.action = cleanup
pulse.task.cleanup.interval = 300

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

pulse-0.1.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

pulse-0.1.2-py2.6.egg (7.7 kB view details)

Uploaded Source

File details

Details for the file pulse-0.1.2.tar.gz.

File metadata

  • Download URL: pulse-0.1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pulse-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8d8ae5d062a3ed093edc3b71ccf151d15be0a66bd50d9195ca3537f170df5cae
MD5 567471302578cfb09fdaf83e36f57cc8
BLAKE2b-256 1916f7546d8995329565c1f15b07f57a9cc0ba6d4d2b65f551967685890ba84b

See more details on using hashes here.

File details

Details for the file pulse-0.1.2-py2.6.egg.

File metadata

  • Download URL: pulse-0.1.2-py2.6.egg
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pulse-0.1.2-py2.6.egg
Algorithm Hash digest
SHA256 8ff127d18f993d8c087b224dca07abf0e9845fa1698e123e5efd42643d70ebeb
MD5 c75faf0eb92fb32c9e509d432944dbdd
BLAKE2b-256 372a3afc87b7b79f5ac10097d43341a45e76488edba56770ac2330600de4b910

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