Skip to content

Commit

Permalink
Merge branch 'release/0.3.44' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvw committed Nov 27, 2024
2 parents 14e8fc2 + f90373b commit 755a0c1
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
5 changes: 1 addition & 4 deletions bin/scripts/celery/live/start_celery.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
cd ~/app &&
celery multi start w1 w2 -A meta_edc -l INFO --workdir="/home/live/app/" --logfile=/home/live/log/%n%I.log --pidfile=/home/live/celery/%n.pid

# to stop
# celery multi stop w1
celery multi start worklive -A meta_edc.celery_live:app -Q live_queue -l INFO --workdir="/home/live/app/" --logfile=/home/live/log/%n%I.log --pidfile=/home/live/celery/%n.pid
5 changes: 1 addition & 4 deletions bin/scripts/celery/uat/start_celery.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
cd ~/app &&
celery multi start w1 w2 -A meta_edc -l INFO --workdir="/home/uat/app/" --logfile=/home/uat/log/%n%I.log --pidfile=/home/uat/celery/%n.pid

# to stop
# celery multi stop w1
celery multi start workuat -A meta_edc.celery_uat:app -Q uat_queue -l INFO --workdir="/home/uat/app/" --logfile=/home/uat/log/%n%I.log --pidfile=/home/uat/celery/%n.pid
20 changes: 20 additions & 0 deletions meta_edc/celery_live.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os

from celery import Celery

# load settings
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meta_edc.settings.debug")

# config celery
app = Celery("meta_edc")
app.config_from_object("django.conf:settings", namespace="CELERY")
app.autodiscover_tasks()

app.conf.task_routes = {
"*": {"queue": "live_queue"},
}


@app.task(bind=True)
def debug_task(self):
print("Request: {0!r}".format(self.request))
20 changes: 20 additions & 0 deletions meta_edc/celery_uat.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import os

from celery import Celery

# load settings
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "meta_edc.settings.debug")

# config celery
app = Celery("meta_edc")
app.config_from_object("django.conf:settings", namespace="CELERY")
app.autodiscover_tasks()

app.conf.task_routes = {
"*": {"queue": "uat_queue"},
}


@app.task(bind=True)
def debug_task(self):
print("Request: {0!r}".format(self.request))

0 comments on commit 755a0c1

Please sign in to comment.