Issue 1:
Hi guys!

Hope you can explain us some strange behavior that we are already solved in our ugly way.

We had some periodic tasks that used default queue celery. We have changed CELERY_DEFAULT_QUEUE to non-default. We using following configuration: Django + Celery + Redis. We using celerybeat-schedule file by default and it's wasn't ever cleaned. Also we didn't clear Redis after changing that variable.

So we faced with that error and researched that our Redis raised up to limits of used_memory and our previous default queue celery was about 500Mb. So it's looks like it contains only periodic tasks and queue always growing up and never consumed by workers.

So our dirty solution: we manually cleaned celery queue from Redis and deleted one celery\x06\x16\x06\x16celery value from _kombu.binding.celery set in Redis. So it's looks like fixed now.

Could you please explain or give us any feedback about the reasons and any kind of solution about this issue.

Kind regards,

Alexander

Issue 2:
Checklist

I have verified that the issue exists against the master branch of Celery.

This has already been asked to the discussion group first.

I have read the relevant section in the

contribution guide

on reporting bugs.

I have checked the issues list

for similar or identical bug reports.

I have checked the pull requests list

for existing proposed fixes.

I have checked the commit log

to find out if the bug was already fixed in the master branch.

I have included all related issues and possible duplicate issues

in this issue (If there are none, check this box anyway).

Mandatory Debugging Information

I have included the output of celery -A proj report in the issue.

(if you are not able to do this, then at least specify the Celery

version affected).

I have verified that the issue exists against the master branch of Celery.

I have included the contents of pip freeze in the issue.

I have included all the versions of all the external dependencies required

to reproduce this bug.

Optional Debugging Information

I have tried reproducing the issue on more than one Python version

and/or implementation.

I have tried reproducing the issue on more than one message broker and/or

result backend.

I have tried reproducing the issue on more than one version of the message

broker and/or result backend.

I have tried reproducing the issue on more than one operating system.

I have tried reproducing the issue on more than one workers pool.

I have tried reproducing the issue with autoscaling, retries,

ETA/Countdown & rate limits disabled.

I have tried reproducing the issue after downgrading

and/or upgrading Celery and its dependencies.

Related Issues and Possible Duplicates

Related Issues

None

Possible Duplicates

None

Environment & Settings

Celery version:

celery report Output:

Steps to Reproduce

Required Dependencies

Minimal Python Version: N/A or Unknown

Minimal Celery Version: N/A or Unknown

Minimal Kombu Version: N/A or Unknown

Minimal Broker Version: N/A or Unknown

Minimal Result Backend Version: N/A or Unknown

Minimal OS and/or Kernel Version: N/A or Unknown

Minimal Broker Client Version: N/A or Unknown

Minimal Result Backend Client Version: N/A or Unknown

Python Packages

pip freeze Output:

Other Dependencies

N/A

Minimally Reproducible Test Case

Expected Behavior

Actual Behavior

I am using the celery add_periodic_task function to create two periodic tasks which take an argument on function call, when I call the function the first time it's working perfectly fine (example: printing something every 10 sec ) on the second function call the value has been updated to second and the first function call is not at all working.

Question: How can I keep my first set of periodic task keep running with the addition of a second set

Please find below code :

create_app.py :

from celery import Celery
from celery.schedules import crontab
from flask import Flask
from celery import Celery
from datetime import timedelta

app_c = Flask(__name__)
app_c.config['CELERY_BACKEND'] = "mongodb://127.0.0.1:27017/mycelery"
app_c.config['CELERY_BROKER_URL'] = "mongodb://127.0.0.1:27017/mycelery"
app_c.config['timezone'] = 'UTC'

def make_celery(app_c):
celery = Celery(app_c.import_name, backend=app_c.config['CELERY_BACKEND'],
broker=app_c.config['CELERY_BROKER_URL'])
celery.conf.update(app_c.config)
TaskBase = celery.Task

class ContextTask(TaskBase):
abstract = True
def __call__(self, *args, **kwargs):
with app_c.app_context():
return TaskBase.__call__(self, *args, **kwargs)
celery.Task = ContextTask
return celery

celery_app_c = make_celery(app_c)

add_periodic.py :

from flask import Flask
from celery import Celery
from datetime import timedelta
from tasks import poll, send
from create_app import celery_app_c
import time

print(celery_app_c)
def add_task(credential):
print("in add task")
celery_app_c.add_periodic_task(10.0,poll.s(credential),name='poll')
celery_app_c.add_periodic_task(20.0,send.s(credential),name='send')

add_task('hello')
time.sleep(20)
add_task('world')

tasks.py:

import time
from celery import Celery
from celery.utils.log import get_task_logger
from create_app import celery_app_c

@celery_app_c.task(name='poll')
def poll(arg):
content_poll(arg)
uri_poll(arg)

@celery_app_c.task(name='send')
def send(arg):
graylog_send(arg)

def content_poll(arg):
print("polling contens ....",arg)

def uri_poll(arg):
print("polling uri .....",arg)

def graylog_send(arg):
print("sending to gl ....... ",arg)

running the following code with : celery -A add_periodic.celery_app_c worker -B --loglevel=INFO

Note: I need to keep running the periodic task with both set of argument passed

Please let me know what I am missing here