Created
November 12, 2021 16:25
-
-
Save Senhaji-Rhazi-Hamza/d58dff1cb6c2e000e64620d66cc4d650 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // worker.js | |
| import celery from "celery-node"; | |
| import celeryConfig from './config.js' | |
| import {add} from './tasks/example/arithmetic.js' | |
| const worker = celery.createWorker( | |
| celeryConfig.BROKER_URL, | |
| celeryConfig.CELERY_RESULT_BACKEND, | |
| celeryConfig.QUEUE // default js-queue | |
| ); | |
| worker.register("js_workers.tasks.example.arithmetic.add", add); | |
| worker.start(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment