{ "info": { "author": "herr kaste", "author_email": "herr.kaste@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries" ], "description": "A convenience module on top of the deferred library that comes with the Google AppEngine (GAE).\n\nIn a nutshell::\n\n from waterf import queue, task\n\n queue.inorder(\n task(check_condition),\n queue.parallel(\n task(remove, id=101),\n task(remove, id=102),\n task(remove, id=103)\n ),\n task(email, to='foo@bar.com')\n ).enqueue()\n\nShould 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``.\n\nTo abort execution of a series you either raise ``queue.PermanentTaskFailure`` or as a convenience return ``queue.ABORT``. If you return another task, you further defer so to speak: the original task will get resolved (or aborted) as soon as the new (returned) task gets resolved (or aborted).\n\nYou use ``task()`` exactly the same as you used ``deferred.defer()``::\n\n task(check, id=102, _countdown=20)\n task(email, to='foo@bar.com', _queue='mailer')\n\nAfter constructing a task you ``enqueue()`` it; the relation to the deferred.defer is roughly speaking::\n\n task(foo, 'bar').enqueue() <==> deferred.defer(foo, 'bar')\n task(foo, 'bar').run() <==> foo('bar')\n\nEnqueue'ing takes (again) the same options defer took, overruling the ones you used in the constructor, e.g.::\n\n task(foo).enqueue(queue='mailer', countdown=60)\n\nwaterf adds two options::\n\n use_id True | False | str\n Use if you don't come up with a good name to prevent double-scheduling\n The value True means autogenerate a good id, otherwise takes your str\n Defaults to True if a name is not set, otherwise to False\n\n release_after \n Determines when the id will be released after your task has finished\n Defaults to 0, immediately\n\nTasks implement a jquery-like callback interface::\n\n task(foo).then(email_user, email_admin).always(...)\n\nThe callbacks must accept as their first argument the message the task sent. But this message passing will likely be dropped in a future version, because it's unused by the library.\n\nOn top of the waterf.queue there is some experimental jet set in the waterf.snake module, which implements a ndb.tasklet like api::\n\n from waterf import snake\n\n def A():\n raise snake.Return('A')\n\n def B(): ...\n\n def work():\n anA = yield snake.task(A)\n yield snake.task(B), snake.task(C) ... # parallel yield\n\n snake.task(work).enqueue()\n\n\n\n\nNote that you have to enable the deferred library in your app.yaml\n\n::\n\n builtins:\n - deferred: on\n\nThank you.", "description_content_type": null, "docs_url": null, "download_url": "http://github.com/kaste/waterf/tarball/master#egg=waterf-dev", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/kaste/waterf", "keywords": "google appengine gae taskqueue deferred", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "waterf", "package_url": "https://pypi.org/project/waterf/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/waterf/", "project_urls": { "Download": "http://github.com/kaste/waterf/tarball/master#egg=waterf-dev", "Homepage": "http://github.com/kaste/waterf" }, "release_url": "https://pypi.org/project/waterf/2.1.2/", "requires_dist": null, "requires_python": null, "summary": "Chaining tasks on Google Appengine's (GAE) taskqueue.", "version": "2.1.2" }, "last_serial": 743162, "releases": { "2": [ { "comment_text": "", "digests": { "md5": "671d0d1c7bebf53e17222d47d0e118f6", "sha256": "63f08bd2a47babac2630498d7552677c26bd289249f066358a599de2c0662157" }, "downloads": -1, "filename": "waterf-2.zip", "has_sig": false, "md5_digest": "671d0d1c7bebf53e17222d47d0e118f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7855, "upload_time": "2013-02-08T17:23:32", "url": "https://files.pythonhosted.org/packages/9d/b2/9325be18e74be04d12e2e1d7f966da7a2c3b7990453faad0dae52150169b/waterf-2.zip" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "d3fe84b55523c0944ae50a90ac9896e3", "sha256": "fc49f2b8aa20d4228a5dd408b989ace092fffa74263e15fc87643861b2ab90eb" }, "downloads": -1, "filename": "waterf-2.0.1.zip", "has_sig": false, "md5_digest": "d3fe84b55523c0944ae50a90ac9896e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7963, "upload_time": "2013-02-28T23:08:53", "url": "https://files.pythonhosted.org/packages/f8/7c/c6cc5ffec2f112c7bdb7a2ea0df9c25ead3a3daad6fabdf9bb13653078d6/waterf-2.0.1.zip" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "be3435740407fa8654a597497d21ab52", "sha256": "42b25a536ac18cf33acf04cb8f98f067c7aa94edc10d2108de4baf5f4de20698" }, "downloads": -1, "filename": "waterf-2.1.0.zip", "has_sig": false, "md5_digest": "be3435740407fa8654a597497d21ab52", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15146, "upload_time": "2013-03-01T00:37:42", "url": "https://files.pythonhosted.org/packages/c5/b7/e627e52fed3ed82de7a4cd3092a8693685d03edc4d46876e4f65756a333a/waterf-2.1.0.zip" } ], "2.1.1": [ { "comment_text": "", "digests": { "md5": "48649464362836bfab7764743f0feaac", "sha256": "4f458958c1e5557780f54267a23c4deba5d5501624a5b25466a21f7108cc2691" }, "downloads": -1, "filename": "waterf-2.1.1.zip", "has_sig": false, "md5_digest": "48649464362836bfab7764743f0feaac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16431, "upload_time": "2013-03-04T22:12:03", "url": "https://files.pythonhosted.org/packages/af/e9/6b35cbe246e296a1dc47e994ed990bc8bde1565cd41947c5ceae568cdefc/waterf-2.1.1.zip" } ], "2.1.2": [ { "comment_text": "", "digests": { "md5": "d870cf9125f6e91c60505292aab4cfd2", "sha256": "01bf48798286e7b30796af95ee718ea22302780de79763f6878c507eed598299" }, "downloads": -1, "filename": "waterf-2.1.2.zip", "has_sig": false, "md5_digest": "d870cf9125f6e91c60505292aab4cfd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16790, "upload_time": "2013-06-03T10:22:36", "url": "https://files.pythonhosted.org/packages/de/e4/4cf6aadee5d2a8cbb77723a027a3c777aef56f30e2bf51c2672069e1c3f0/waterf-2.1.2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d870cf9125f6e91c60505292aab4cfd2", "sha256": "01bf48798286e7b30796af95ee718ea22302780de79763f6878c507eed598299" }, "downloads": -1, "filename": "waterf-2.1.2.zip", "has_sig": false, "md5_digest": "d870cf9125f6e91c60505292aab4cfd2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16790, "upload_time": "2013-06-03T10:22:36", "url": "https://files.pythonhosted.org/packages/de/e4/4cf6aadee5d2a8cbb77723a027a3c777aef56f30e2bf51c2672069e1c3f0/waterf-2.1.2.zip" } ] }