Skip to main content

A convenience module on top of the deferred library that comes with the Google AppEngine (GAE).

Note that you have to enable the deferred library in your app.yaml

builtins:
- deferred: on

In a nutshell:

from waterf import queue, task

queue.inorder(
    task(check_condition),
    queue.parallel(
        task(remove, id=101),
        task(remove, id=102),
        task(remove, id=103)
    ),
    task(email, to='foo@bar.com')
).run()

Should be pretty self-explanatory: it first runs the function check_condition, then it runs the function remove three times in parallel, after that it runs email.

To abort execution of a series you either raise queue.PermanentTaskFailure or as a convenience return queue.ABORT.

You use task() exactly the same as you used deferred.defer():

task(check, id=102, _countdown=20)
task(email, to='foo@bar.com', _queue='mailer')

After constructing a task you either run() or enqueue() it; whereby:

task(foo, 'bar').enqueue()  <==> deferred.defer(foo, 'bar')
task(foo, 'bar').run()      <==> foo('bar')

Read the tests. Thank you.

Metadata

Release files for waterf 2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for waterf 2
File Size Uploaded
waterf-2.zip 7.9 kB Details

Release files / waterf-2.zip

Download URL waterf-2.zip
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
63f08bd2a47babac2630498d7552677c26bd289249f066358a599de2c0662157
BLAKE2b-256 checksum
How to use checksums
9db29325be18e74be04d12e2e1d7f966da7a2c3b7990453faad0dae52150169b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

2.1.2

1 release file

2.1.1

1 release file

2.1.0

1 release file

2.0.1

1 release file

This release

2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page