Amin.B
Amin.B

Reputation: 137

Schedule ignors kwargs in django-q

I am using Django-q (https://django-q.readthedocs.io) for queuing in the Django framework. I have an async function when I use async_task:

async_task('sms.tasks.send',
                       username=username,
                       password=password,
                       text=text,
                       to=to,
                       path=path,
)

everything is ok and works fine. but when I use it with schedule:

schedule('sms.tasks.send',
                       username=username,
                       password=password,
                       text=text,
                       to=to,
                       path=path,
next_run=scheduled_time)

Although nothing has changed and even in Scheduled task all Kwargs exist, in execution, no Kwargs passes. Does anybody has faced this problem with Django-q?

Upvotes: 1

Views: 721

Answers (1)

Amin.B
Amin.B

Reputation: 137

It's solved. Remember do not pass a model instance as a Kwarg argument. That was the problem.

Upvotes: 1

Related Questions