0

I have a rather funny problem that I didn't manage to find it elsewhere. I have 2 django-celery projects running with redis on 2 different domains, but apparently hosted on the same box. I don't have sudo access, so I don't use the reddis daemon or the celery one, but instead I check/launch them via cron like this:

ps -u $USER | grep redis-server >/dev/null || $HOME/bin/redis-server $HOME/redis-stable/redis.conf

ps -u $USER | grep python >/dev/null || $HOME/python27/bin/python $HOME/utilities/manage.py celeryd -E -B --concurrency=1 && $HOME/python27/bin/python $HOME/utilities/manage.py celerycam

I didn't modify anything in the original redis.conf file and for both projects my "settings.py" contains:

BROKER_URL = "redis://localhost:6379/0"
BROKER_TRANSPORT_OPTIONS = {'visibility_timeout': 3600}
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'

import djcelery
from celery.schedules import crontab

djcelery.setup_loader()

CELERYBEAT_SCHEDULER = 'djcelery.schedulers.DatabaseScheduler'

ok the problem is that I have 2 scheduled-tasks on one domain's djcelery django admin and for the other domain no tasks yet. But under the "Tasks" page in this second's domain django admin I can see all the tasks launched by the first domain. I don't know what can I do to fix this. My domains don't share the same database or any other resources and anallizing their processes I can see that each of them have their different instance of redis, celeryd and celerycam. Thank you for your help.

symbiotech
  • 101
  • 4

1 Answers1

0

I changed the redis port for one of the domains and the problem was solved. Probably celerycam was catching tasks from both workers, even if they were on different users.

symbiotech
  • 101
  • 4