{ "info": { "author": "zlyuan", "author_email": "1277260932@qq.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# \u4e00\u4e2a\u8f7b\u91cf\u7684\u91cd\u8bd5\u5305\n\n\n### \u5b9e\u4f8b\u4ee3\u7801\n```python\nfrom zretry import retry\n@retry\ndef fun():\n a = 1 / 0\nfun() # \u6b64\u65f6\u4f1a\u4e0d\u505c\u7684\u5c1d\u8bd5\u8c03\u7528\u76f4\u5230\u6210\u529f, \u6bcf\u6b21\u5c1d\u8bd5\u95f4\u9694\u4e00\u79d2\n```\n\n### \u9650\u5236\u5c1d\u8bd5\u6b21\u6570\n```python\nfrom zretry import retry\n@retry(max_attempt_count=5) # \u6700\u591a\u5c1d\u8bd5\u8c03\u75285\u6b21, \u8d85\u51fa5\u6b21\u540e\u62a5\u9519\ndef fun():\n a = 1 / 0\nfun()\n```\n\n### \u53c2\u6570\u8bf4\u660e\n\u53c2\u6570\u540d|\u6570\u636e\u7c7b\u578b|\u9ed8\u8ba4\u503c|\u63cf\u8ff0\n--|:--:|:--:|---\ninterval | float | 1 | \u6bcf\u6b21\u5c1d\u8bd5\u95f4\u9694\u65f6\u95f4\nmax_attempt_count | int | None | \u6700\u5927\u5c1d\u8bd5\u6b21\u6570\nresult_retry_flag | any | None | \u5982\u679c\u8c03\u7528\u7684\u51fd\u6570\u4e0d\u62a5\u9519, \u5b83\u7684\u8fd4\u56de\u503c\u548cresult_retry_flag\u7684id\u662f\u540c\u4e00\u4e2aid, \u5219\u91cd\u8bd5\nerror_callback | function | None | \u6bcf\u6b21\u5c1d\u8bd5\u9519\u8bef\u90fd\u4f1a\u56de\u8c03\u8fd9\u4e2a\u51fd\u6570, \u5b83\u63a5\u6536\u4e00\u4e2a\u53c2\u6570, \u8be5\u53c2\u6570\u8868\u793a\u5c1d\u8bd5\u7684\u662f\u54ea\u4e2a\u51fd\u6570\n\n### \u66f4\u65b0\u65e5\u5fd7\n\u53d1\u5e03\u65f6\u95f4|\u53d1\u5e03\u7248\u672c|\u53d1\u5e03\u8bf4\u660e\n--|:--:|---\n19-01-13 | 0.1.1 | \u4fee\u590d\u5bf9\u7c7b\u51fd\u6570\u4f7f\u7528\u88c5\u9970\u5668\u4f1a\u5bfc\u81f4\u8c03\u7528\u65f6\u62a5\u9519\u7684bug\n19-01-08 | 0.1.0 | \u53d1\u5e03\u7b2c\u4e00\u7248\n\n- - -\n##### \u672c\u9879\u76ee\u4ec5\u4f9b\u6240\u6709\u4eba\u5b66\u4e60\u4ea4\u6d41\u4f7f\u7528, \u7981\u6b62\u7528\u4e8e\u5546\u4e1a\u7528\u9014\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://pypi.org/", "keywords": "", "license": "GNU GENERAL PUBLIC LICENSE", "maintainer": "", "maintainer_email": "", "name": "zretry", "package_url": "https://pypi.org/project/zretry/", "platform": "all", "project_url": "https://pypi.org/project/zretry/", "project_urls": { "Homepage": "https://pypi.org/" }, "release_url": "https://pypi.org/project/zretry/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "\u4e00\u4e2a\u8f7b\u91cf\u7684\u91cd\u8bd5\u5305", "version": "0.1.1" }, "last_serial": 4690156, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5e7211c4dfcc438da5911436f8d2a7b2", "sha256": "43b76b517999203e125a8c2244c5952aefb8c78541c8a6b38a62fd0f6d72340a" }, "downloads": -1, "filename": "zretry-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5e7211c4dfcc438da5911436f8d2a7b2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15130, "upload_time": "2019-01-08T07:51:37", "url": "https://files.pythonhosted.org/packages/64/d5/b3dd0115e3eab044a3b487c9e283572f99b661e2addb4abbe740a41cc206/zretry-0.1.0-py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "12f624bcef837446b819909954b09323", "sha256": "a2fd49d63c69deb23f05cef3544da9fa02b293bdccd40eb24c59292a4bfd8cf8" }, "downloads": -1, "filename": "zretry-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "12f624bcef837446b819909954b09323", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15204, "upload_time": "2019-01-13T07:20:16", "url": "https://files.pythonhosted.org/packages/03/23/cf5db00ef45a37cf6dfe00dca6ef6ce8acc8930eb0c604468e267eaa4068/zretry-0.1.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "12f624bcef837446b819909954b09323", "sha256": "a2fd49d63c69deb23f05cef3544da9fa02b293bdccd40eb24c59292a4bfd8cf8" }, "downloads": -1, "filename": "zretry-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "12f624bcef837446b819909954b09323", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 15204, "upload_time": "2019-01-13T07:20:16", "url": "https://files.pythonhosted.org/packages/03/23/cf5db00ef45a37cf6dfe00dca6ef6ce8acc8930eb0c604468e267eaa4068/zretry-0.1.1-py3-none-any.whl" } ] }