API - disable worker entry point
This commit is contained in:
parent
827867e822
commit
9df851bc28
@ -396,7 +396,7 @@ For instance, copy and update ``.env`` file from ``.env.example`` and source the
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ fittrackee_worker --processes 2
|
$ flask worker --processes 2
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
| To start application and workers with **systemd** service, see `Deployment <installation.html#deployment>`__
|
| To start application and workers with **systemd** service, see `Deployment <installation.html#deployment>`__
|
||||||
|
@ -81,6 +81,14 @@ def upgrade_db() -> None:
|
|||||||
upgrade(directory=BASEDIR + '/migrations')
|
upgrade(directory=BASEDIR + '/migrations')
|
||||||
|
|
||||||
|
|
||||||
|
def worker() -> None:
|
||||||
|
raise SystemExit(
|
||||||
|
"Error: this command is disabled, "
|
||||||
|
"it will be removed in a next version.\n"
|
||||||
|
"Please use flask-dramatiq CLI instead ('flask worker')."
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
options = {'bind': f'{HOST}:{PORT}', 'workers': WORKERS}
|
options = {'bind': f'{HOST}:{PORT}', 'workers': WORKERS}
|
||||||
StandaloneApplication(app, options).run()
|
StandaloneApplication(app, options).run()
|
||||||
|
@ -70,7 +70,7 @@ types-redis = "^4.3"
|
|||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
fittrackee = 'fittrackee.__main__:main'
|
fittrackee = 'fittrackee.__main__:main'
|
||||||
fittrackee_worker = 'flask_dramatiq:worker'
|
fittrackee_worker = 'fittrackee.__main__:worker' # disabled
|
||||||
ftcli = 'fittrackee.cli:cli'
|
ftcli = 'fittrackee.cli:cli'
|
||||||
fittrackee_set_admin = 'fittrackee.__main__:set_admin' # deprecated
|
fittrackee_set_admin = 'fittrackee.__main__:set_admin' # deprecated
|
||||||
fittrackee_upgrade_db = 'fittrackee.__main__:upgrade_db' # deprecated
|
fittrackee_upgrade_db = 'fittrackee.__main__:upgrade_db' # deprecated
|
||||||
|
Loading…
Reference in New Issue
Block a user