diff --git a/conf/loader.yml b/conf/loader.yml --- a/conf/loader.yml +++ b/conf/loader.yml @@ -14,6 +14,11 @@ directory: 1000 revision: 1000 +scheduler: + cls: remote + args: + url: http://swh-scheduler-api:5008/ + celery: task_broker: amqp://guest:guest@amqp// task_modules: diff --git a/docker-compose.yml b/docker-compose.yml --- a/docker-compose.yml +++ b/docker-compose.yml @@ -346,6 +346,7 @@ entrypoint: /entrypoint.sh depends_on: - swh-storage + - swh-scheduler-api - amqp volumes: - "./conf/loader.yml:/loader.yml:ro" diff --git a/services/swh-listers-worker/entrypoint.sh b/services/swh-listers-worker/entrypoint.sh --- a/services/swh-listers-worker/entrypoint.sh +++ b/services/swh-listers-worker/entrypoint.sh @@ -26,8 +26,8 @@ echo Initialize database swh lister -C ${SWH_CONFIG_FILENAME} db-init - echo Register lister task types in scheduler database - swh lister -C ${SWH_CONFIG_FILENAME} register-task-types + echo Register task types in scheduler database + swh scheduler -C ${SWH_CONFIG_FILENAME} task-type register echo Waiting for RabbitMQ to start wait-for-it amqp:5672 -s --timeout=0 diff --git a/services/swh-loaders-worker/entrypoint.sh b/services/swh-loaders-worker/entrypoint.sh --- a/services/swh-loaders-worker/entrypoint.sh +++ b/services/swh-loaders-worker/entrypoint.sh @@ -13,6 +13,9 @@ echo Waiting for RabbitMQ to start wait-for-it amqp:5672 -s --timeout=0 + echo Register task types in scheduler database + swh scheduler -C ${SWH_CONFIG_FILENAME} task-type register + echo Starting the swh-loader Celery worker for ${SWH_WORKER_INSTANCE} exec python -m celery worker \ --app=swh.scheduler.celery_backend.config.app \