15👍
I had the same issue. Make sure the arguments are JSON formatted. For example, try setting the positional args to [1, false] — lowercase ‘false’ — I just tested it on a django-celery instance (version 2.2.4) and it worked.
For the keyword args, use something like {“name”: “aldarund”}
👤Evan
9👍
I got the same problem too.
With the description of PeriodicTask models in djcelery (“JSON encoded positional arguments”), same as Evan answer. I try using python json lib to encode before save.
And this work with me
import json
o = PeriodicTask()
o.kwargs = json.dumps({'myargs': 'hello'})
o.save()
celery version 3.0.11
- Limit Maximum Choices of ManyToManyField
- Django: datetime filter by date ignoring time
- Custom label on ModelChoiceField form field
- Django limit_choices_to on user group
0👍
CELERYBEAT_SCHEDULE = {
"example": {
"task": "<task.module.path>",
"schedule": crontab(),
"enable": False
},
}
I tried and it worked.I run on celery beat v5.1.2
- Where is Pip3 Installing Modules?
- Django datefield and timefield to python datetime
- Limit Maximum Choices of ManyToManyField
- Django_auth_ldap no module named ldap
- Django and models with multiple foreign keys
Source:stackexchange.com