Skip to content

Commit

Permalink
Fixes Koed00#314 - Convert func to str so that resubmitting failed ta…
Browse files Browse the repository at this point in the history
…sk works
  • Loading branch information
kennyhei committed May 8, 2021
1 parent 8c51f1f commit 35a255a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions django_q/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ def async_task(func, *args, **kwargs):
q_options = keywords.pop("q_options", {})
# get an id
tag = uuid()
# convert func to str
if not isinstance(func, str):
func = f"{func.__module__}.{func.__name__}"
# build the task package
task = {
"id": tag[1],
Expand Down

0 comments on commit 35a255a

Please sign in to comment.