Answer the question
In order to leave comments, you need to log in
What is the correct way to run python scrpt using parallel?
I want to run Flask_python and scheduler in parallel in one container. I
found some parallel utility and
tried to run it like this
(source venv/bin/activate && gunicorn -w 1 -b 0.0.0.0:8228 wsgi:scope; source venv/bin/activate && python scope/checkers/main_scheduler.py) | parallel
/usr/bin/bash: -c: строка 0: синтаксическая ошибка рядом с неожиданным маркером «(»
/usr/bin/bash: -c: строка 0: `2020-10-28 21:55:26,313 INFO sqlalchemy.engine.base.Engine SELECT CAST('test plain returns' AS VARCHAR(60)) AS anon_1'
/usr/bin/bash: -c: строка 0: синтаксическая ошибка рядом с неожиданным маркером «(»
/usr/bin/bash: -c: строка 0: `2020-10-28 21:55:26,313 INFO sqlalchemy.engine.base.Engine ()'
/usr/bin/bash: -c: строка 0: синтаксическая ошибка рядом с неожиданным маркером «(»
/usr/bin/bash: -c: строка 0: `2020-10-28 21:55:26,313 INFO sqlalchemy.engine.base.Engine SELECT CAST('test unicode returns' AS VARCHAR(60)) AS anon_1'
$ (source venv/bin/activate && gunicorn -w 1 -b 0.0.0.0:8228 wsgi:scope) | parallel
[2020-10-28 21:55:09 +0300] [27457] [INFO] Starting gunicorn 20.0.4
[2020-10-28 21:55:09 +0300] [27457] [INFO] Listening at: http://0.0.0.0:8228 (27457)
[2020-10-28 21:55:09 +0300] [27457] [INFO] Using worker: sync
[2020-10-28 21:55:09 +0300] [27465] [INFO] Booting worker with pid: 27465
/home/drno/IdeaProjects/inclouds/msk_scope/venv/lib/python3.8/site-packages/flask_marshmallow/__init__.py:26: UserWarning: Flask-SQLAlchemy integration requires marshmallow-sqlalchemy to be installed.
warnings.warn(
^C[2020-10-28 21:55:10 +0300] [27457] [INFO] Handling signal: int
[2020-10-28 21:55:11 +0300] [27465] [INFO] Worker exiting (pid: 27465)
[2020-10-28 21:55:11 +0300] [27457] [INFO] Shutting down: Master
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question