Skip to content

Commit

Permalink
fix: requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
kushagra189 committed Nov 10, 2022
1 parent e645141 commit 574f62a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions cwl_wes/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ def init_app() -> App:
service_info.set_service_info(
data=current_app.config.foca.custom.service_info.dict()
)
celery_app = foca.create_celery_app()
register_task_service(celery_app)
register_task_service()
return app


Expand Down
7 changes: 4 additions & 3 deletions cwl_wes/tasks/register_celery.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
"""Function to create Celery app instance and register task monitor."""

from celery import Celery
from cwl_wes.worker import celery_app
import logging
import os

from foca.models.config import Config
from cwl_wes.tasks.celery_task_monitor import TaskMonitor


# Get logger instance
logger = logging.getLogger(__name__)


def register_task_service(celery_app: Celery) -> None:
def register_task_service() -> None:
"""Instantiates Celery app and registers task monitor."""
# Ensure that code is executed only once when app reloader is used
if os.environ.get("WERKZEUG_RUN_MAIN") != 'true':
# Start task monitor daemon
foca_config = celery_app.conf.foca
foca_config: Config = celery_app.conf.foca
custom_config = foca_config.custom
TaskMonitor(
celery_app=celery_app,
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
foca==0.11.0
foca==0.12.0
-e git+https://github.com/ohsu-comp-bio/cwl-tes.git@7b44cb1825a302bb7eccb3f2d91dc233adc0e32f#egg=cwl-tes
# -e git+https://github.com/uniqueg/cwl-tes.git@57a193cabab2444bc9b661f83011837bd5ed571a#egg=cwl-tes
drs-cli==0.2.3
gunicorn==19.9.0
py-tes==0.4.2
Expand Down

0 comments on commit 574f62a

Please sign in to comment.