{ "info": { "author": "Kapil Thangavelu", "author_email": "kapil.foss@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "mongoqueue\n----------\n\nProperties\n==========\n\n - Isolation\n\n Do not let different consumers process the same message.\n\n - Reliablity\n\n Do not let a failed consumer disappear an item.\n\n - Atomic\n\n Operations on the queue are atomic.\n\nUsage\n=====\n\nA queue can be instantiated with a mongo collection and a consumer\nidentifier. The consumer identifier helps distinguish multiple queue\nconsumers that are taking jobs from the queue::\n\n >> from pymongo import Connection\n >> from mongoqueue import MongoQueue\n >> queue = MongoQueue(\n ... Connection(TEST_DB).doctest_queue,\n ... consumer_id=\"consumer-1\",\n ... timeout=300,\n ... max_attempts=3)\n\nThe ``MongoQueue`` class ``timeout`` parameters specifies how long in a\nseconds a how long a job may be held by a consumer before its\nconsidered failed.\n\nA job which timeouts or errors more than the ``max_attempts``\nparameter is considered permanently failed, and will no longer be\nprocessed.\n\nNew jobs/items can be placed in the queue by passing a dictionary::\n\n >> queue.put({\"foobar\": 1})\n\nA job ``priority`` key and integer value can be specified in the\ndictionary which will cause the job to be processed before lower\npriority items::\n\n >> queue.put({\"foobar\": 0}, priority=1})\n\nAn item can be fetched out by calling the ``next`` method on a queue.\nThis returns a Job object::\n\n >> job = queue.next()\n >> job.payload\n {\"foobar\": 1}\n\nThe job class exposes some control methods on the job, for marking progress,\ncompletion, errors, or releasing the job back into the queue.\n\n - ``complete`` Marks a job as complete and removes it from the queue.\n\n - ``error`` Optionally specified with a message, releases the job back to the\n queue, and increments its attempts, and stores the error message on the job.\n\n - ``progress`` Optionally takes a progress count integer, notes progress on the job\n and resets the lock timeout.\n\n - ``release`` Release a job back to the pool. The attempts counter is not modified.\n\nAs a convience the job supports the context manager protocol::\n\n >> with job as data:\n ... print data['payload']\n\n {\"foobar: 0}\n\nIf the context closure is exited without the job is marked complete,\nif there's an exception the error is stored on the job.\n\n\nInspired By\n===========\n\n- [0] https://github.com/skiz/mongo_queue/blob/master/lib/mongo_queue.rb\n- [1] http://blog.boxedice.com/2011/09/28/replacing-rabbitmq-with-mongodb/\n- [2] http://blog.boxedice.com/2011/04/13/queueing-mongodb-using-mongodb/\n- [3] https://github.com/lunaru/mongoqueue\n- [4] http://www.captaincodeman.com/2011/05/28/simple-service-bus-message-queue-mongodb/\n\n\nRunning Tests\n=============\n\nUnit tests can be run with\n\n $ python setup.py nosetests\n\nChanges\n=======\n\n0.6.0 - Feb 4th, 2013 - Isolate passed in data from metadata in Job.\n0.5.2 - Dec 9th, 2012 - Fix for regression in sort parameters from pymongo 2.4\n0.5.1 - Dec 2nd, 2012 - Packaging fix for readme data file.\n\nCredits\n=======\n\nKapil Thangavelu, author & maintainer\nDustin Laurence, sort fix for pymongo 2.4\nJonathan Sackett, Job data isolation.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/kapilt/mongoqueue", "keywords": null, "license": "BSD-derived", "maintainer": null, "maintainer_email": null, "name": "mongoqueue", "package_url": "https://pypi.org/project/mongoqueue/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mongoqueue/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/kapilt/mongoqueue" }, "release_url": "https://pypi.org/project/mongoqueue/0.7.2/", "requires_dist": null, "requires_python": null, "summary": "A queue using mongo as backend storage.", "version": "0.7.2" }, "last_serial": 943522, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "bb77d2991f77154e4ce75adc135edc06", "sha256": "c07c82b2bd132390dd6c29c94dda846c18ea1e1b3be848ea18002642fa0f47fe" }, "downloads": -1, "filename": "mongoqueue-0.5.0.tar.gz", "has_sig": false, "md5_digest": "bb77d2991f77154e4ce75adc135edc06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4653, "upload_time": "2012-05-16T03:20:34", "url": "https://files.pythonhosted.org/packages/64/f6/798270dc6f3e649670d682fd6cdf60dbd02620152b5c4b3282fe7274e34b/mongoqueue-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "28a64d29d5d139618ab71bad0addcec3", "sha256": "16a5c6e28a6d07aa12bfdd4e3b23dac27c2ef42a478387a2556ad1971edd4862" }, "downloads": -1, "filename": "mongoqueue-0.5.1.tar.gz", "has_sig": false, "md5_digest": "28a64d29d5d139618ab71bad0addcec3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5048, "upload_time": "2012-12-02T14:57:48", "url": "https://files.pythonhosted.org/packages/a9/e2/6719dc644c2d1d5aa96c1eae91624f63a87d794cf38a9acd61e79ea045ed/mongoqueue-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "18b706c1c3a1cabbd256afc959545967", "sha256": "83f6cdf57ffc37d04dd6bb85d814d7e817b8a471a99fd755e37a9a6835e140f1" }, "downloads": -1, "filename": "mongoqueue-0.5.2.tar.gz", "has_sig": false, "md5_digest": "18b706c1c3a1cabbd256afc959545967", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5118, "upload_time": "2012-12-09T16:56:59", "url": "https://files.pythonhosted.org/packages/c0/97/47168571d38a6142b4aa55fa4cd743f7df94889e9e57474671fdf434ac8f/mongoqueue-0.5.2.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "1950cbe031aac6bfa0be9ca64b7e86c5", "sha256": "8c8a93e48a13fddf033c15185a72b9405cc22bce87d550e3b9f2b5b5f6816fc5" }, "downloads": -1, "filename": "mongoqueue-0.6.0.tar.gz", "has_sig": false, "md5_digest": "1950cbe031aac6bfa0be9ca64b7e86c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5177, "upload_time": "2013-02-05T15:08:49", "url": "https://files.pythonhosted.org/packages/f6/2f/57fd6d05b80537578aea3c357c70c800d1b16bf8c5f205544d6ae94e9f53/mongoqueue-0.6.0.tar.gz" } ], "0.7.": [ { "comment_text": "", "digests": { "md5": "98ade5e285e9464ddd9f3a23a7ee127f", "sha256": "e75ae25aa6f7cbaba2f72f4992efb3e7184933561594be6b5d8614c941ed30ef" }, "downloads": -1, "filename": "mongoqueue-0.7..tar.gz", "has_sig": false, "md5_digest": "98ade5e285e9464ddd9f3a23a7ee127f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6202, "upload_time": "2013-12-13T04:25:43", "url": "https://files.pythonhosted.org/packages/12/fb/6ac105c61fa24e04e2166e55fc6d2bee6975848b145a9457cbe96e0414b3/mongoqueue-0.7..tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "4fa8616e470ce73565a65693f708189a", "sha256": "530dc8ba789e78c8db8091d82914ab514663f0c10d4f346e6e13850a631bd8c0" }, "downloads": -1, "filename": "mongoqueue-0.7.0.tar.gz", "has_sig": false, "md5_digest": "4fa8616e470ce73565a65693f708189a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6181, "upload_time": "2013-12-13T04:24:27", "url": "https://files.pythonhosted.org/packages/68/90/d7082ecf217dd69dcf6fa12db5935a145beabb218a5b49fbd587dccca326/mongoqueue-0.7.0.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "68312538ec6fba163b0c984d73b35fe0", "sha256": "82571da6e9c8a9aef85cb32edfce44c9a2b7c5b21f29133518123800769b4bec" }, "downloads": -1, "filename": "mongoqueue-0.7.1.tar.gz", "has_sig": false, "md5_digest": "68312538ec6fba163b0c984d73b35fe0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6201, "upload_time": "2013-12-13T04:25:54", "url": "https://files.pythonhosted.org/packages/4e/b4/487cf067682d4aad3b2a627e7a38b996c7634e0151bf8a8cb1e1b652f4e8/mongoqueue-0.7.1.tar.gz" } ], "0.7.2": [ { "comment_text": "", "digests": { "md5": "81d7ee7f02c7a5952a21adf9f65b7e14", "sha256": "218296c7d04fbb090dd68532fbf2b2504efd1fc7b7869d0e73b27720bee721db" }, "downloads": -1, "filename": "mongoqueue-0.7.2.tar.gz", "has_sig": false, "md5_digest": "81d7ee7f02c7a5952a21adf9f65b7e14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6210, "upload_time": "2013-12-13T04:27:53", "url": "https://files.pythonhosted.org/packages/0d/ce/f1cf86f2bf79884d4dd6bf8bca45bbc59452af7b4678bc3a1faadec75e08/mongoqueue-0.7.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "81d7ee7f02c7a5952a21adf9f65b7e14", "sha256": "218296c7d04fbb090dd68532fbf2b2504efd1fc7b7869d0e73b27720bee721db" }, "downloads": -1, "filename": "mongoqueue-0.7.2.tar.gz", "has_sig": false, "md5_digest": "81d7ee7f02c7a5952a21adf9f65b7e14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6210, "upload_time": "2013-12-13T04:27:53", "url": "https://files.pythonhosted.org/packages/0d/ce/f1cf86f2bf79884d4dd6bf8bca45bbc59452af7b4678bc3a1faadec75e08/mongoqueue-0.7.2.tar.gz" } ] }