{ "info": { "author": "Lx Yu", "author_email": "i@lxyu.net", "bugtrack_url": null, "classifiers": [], "description": "Supervisor-Quick\n================\n\nBypass supervisor's nasty callbacks stack and make it quick!\n\n\nUsage\n-----\n\n.. code:: bash\n\n $ pip install supervisor-quick\n\nAnd add the following config to `supervisord.conf`.\n\n.. code:: ini\n\n [ctlplugin:quick]\n supervisor.ctl_factory = supervisor_quick:make_quick_controllerplugin\n\nThen start `supervisorctl` and use `quickstart`, `quickstop` and\n`quickrestart` to start/stop/restart processes.\n\n.. code::\n\n > quickstart app:0\n > quickstart app:\n > quickstart ap*\n > quickstart all\n\n > quickstop app:1\n > quickstop app:\n > quickstop ap*\n > quickstop all\n\n > quickrestart app:2\n > quickrestart app:\n > quickrestart ap*\n > quickrestart all\n\nIt effects `supervisorctl`, so you don't have to restart the whole\nsupervisord to make it work.\n\n\nWhy\n---\n\nI write this plugin because supervisor is just tooooo slow in\nstart/stop/restart app server in our prod servers.\n\nAnd I checked the source code and found it is because of the\nnasty callbacks stack, and this is a quote from source code\n`supervisor/rpcinterface.py`::\n\n # XXX the above implementation has a weakness inasmuch as the\n # first call into each individual process callback will always\n # return NOT_DONE_YET, so they need to be called twice. The\n # symptom of this is that calling this method causes the\n # client to block for much longer than it actually requires to\n # kill all of the running processes. After the first call to\n # the killit callback, the process is actually dead, but the\n # above killall method processes the callbacks one at a time\n # during the select loop, which, because there is no output\n # from child processes after e.g. stopAllProcesses is called,\n # is not busy, so hits the timeout for each callback. I\n # attempted to make this better, but the only way to make it\n # better assumes totally synchronous reaping of child\n # processes, which requires infrastructure changes to\n # supervisord that are scary at the moment as it could take a\n # while to pin down all of the platform differences and might\n # require a C extension to the Python signal module to allow\n # the setting of ignore flags to signals.\n\nAnd this plugin will do a `quick` start/stop/restart action that bypass\nall the callback checks, making it lightning fast.\n\nIt also have wildcard concurrent execution support, keeping it fast\nregardless of processes amount. (This function is inspired by\n`supervisor-wildcards `_)\n\n\nExample\n-------\n\nAn example time demo for a app server with numprocs set to 32 to show how quick\nsupervisor can be with `quick` command.\n\n.. code:: bash\n\n $ supervisorctl status\n app:0 STOPPED\n app:1 STOPPED\n app:10 STOPPED\n ......\n app:7 STOPPED\n app:8 STOPPED\n app:9 STOPPED\n\n $ time supervisorctl start app:\n 24: started\n 25: started\n 26: started\n ......\n 18: started\n 31: started\n 30: started\n supervisorctl start app: 0.06s user 0.02s system 0% cpu 48.442 total\n\n $ time supervisorctl stop app:\n 24: stopped\n 25: stopped\n 26: stopped\n ......\n 18: stopped\n 31: stopped\n 30: stopped\n supervisorctl stop app: 0.06s user 0.03s system 0% cpu 36.278 total\n\n $ time supervisorctl quickstart app:\n app:25: started\n app:24: started\n app:27: started\n ......\n app:1: started\n app:8: started\n app:9: started\n supervisorctl quickstart app: 0.09s user 0.03s system 19% cpu 0.618 total\n\n $ time supervisorctl quickstop app:\n app:26: stoped\n app:27: stoped\n app:22: stoped\n ......\n app:0: stoped\n app:9: stoped\n app:8: stoped\n supervisorctl quickstop app: 0.09s user 0.04s system 68% cpu 0.196 total", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://lxyu.github.io/supervisor-quick/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "supervisor-quick", "package_url": "https://pypi.org/project/supervisor-quick/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/supervisor-quick/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://lxyu.github.io/supervisor-quick/" }, "release_url": "https://pypi.org/project/supervisor-quick/0.1.4/", "requires_dist": null, "requires_python": null, "summary": "Bypass supervisor's nasty callbacks stack and make it quick!", "version": "0.1.4" }, "last_serial": 1211163, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "461603014fcdd5950f037fc7033e14dd", "sha256": "e35e9dfe84c61ecfb5de8c6225b3043add99212feba40c8a3d922674a6aaaa6f" }, "downloads": -1, "filename": "supervisor-quick-0.1.0.tar.gz", "has_sig": false, "md5_digest": "461603014fcdd5950f037fc7033e14dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2720, "upload_time": "2014-03-20T07:16:41", "url": "https://files.pythonhosted.org/packages/cc/26/b07e75a41c0c66ed446a7fd297a874666e20b23870983befd1ea8f66fb73/supervisor-quick-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e81ebf07c0c5fe35e2791b44f249f2a7", "sha256": "0a787b2793fae7f08596a124277c056c9f65c76f0fdcacff0edb1a524acdf930" }, "downloads": -1, "filename": "supervisor-quick-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e81ebf07c0c5fe35e2791b44f249f2a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3424, "upload_time": "2014-03-20T07:32:32", "url": "https://files.pythonhosted.org/packages/44/70/b3f62c6fdc722daf7791be2bf7c9053f59195e88b445a7ce272fd804939c/supervisor-quick-0.1.1.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "9bf72e234ef74a24a39c7eb3e50e2212", "sha256": "1d77eb94fe93dab6bf98333fed8f799df78d102b5423d065eb3cf8722ac58767" }, "downloads": -1, "filename": "supervisor-quick-0.1.3.tar.gz", "has_sig": false, "md5_digest": "9bf72e234ef74a24a39c7eb3e50e2212", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3600, "upload_time": "2014-04-09T07:36:39", "url": "https://files.pythonhosted.org/packages/e7/a0/3481c048ca815012535b826e43bc68d253f2a7eb1fb6aa9b9679dfb93e86/supervisor-quick-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "bea8fe8aa1a8c1df6e56273af8141ff1", "sha256": "8be428cc10e868b2d2dfc57fc5b9ea1b2652d7c78b60313750a50ff77f92a9f3" }, "downloads": -1, "filename": "supervisor-quick-0.1.4.tar.gz", "has_sig": false, "md5_digest": "bea8fe8aa1a8c1df6e56273af8141ff1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3662, "upload_time": "2014-09-03T06:22:16", "url": "https://files.pythonhosted.org/packages/a9/39/aafe116403d625c1034aa442b22c80287b4c4ab6c818b794dd9282a00d03/supervisor-quick-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bea8fe8aa1a8c1df6e56273af8141ff1", "sha256": "8be428cc10e868b2d2dfc57fc5b9ea1b2652d7c78b60313750a50ff77f92a9f3" }, "downloads": -1, "filename": "supervisor-quick-0.1.4.tar.gz", "has_sig": false, "md5_digest": "bea8fe8aa1a8c1df6e56273af8141ff1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3662, "upload_time": "2014-09-03T06:22:16", "url": "https://files.pythonhosted.org/packages/a9/39/aafe116403d625c1034aa442b22c80287b4c4ab6c818b794dd9282a00d03/supervisor-quick-0.1.4.tar.gz" } ] }