The ScheduledTasksPlugin throws the mentioned error massage. The reason is the member_func. If I remove this from the SCHEDULED_TASKS the error is gone. There is a difference between calling the global functions and the function in the class. the global functions work fine. I had a look in the mentioned django source but i do not have enough insight into this.
Eneble the ScheduledTasksPlugin from the admin interface
Watch the log
function member_func should be called.
InvenTree Version [0.10.0 dev]
Commit Hash c20b327
Commit Date 2023-01-25
17:17:55 [Q] INFO Process-1:4 processing [jersey-ceiling-mike-mississippi] Hello World 17:17:55 [Q] INFO Processed [stream-august-florida-twelve] 17:17:55 [Q] INFO Processed [jersey-ceiling-mike-mississippi] 17:17:55 [Q] ERROR Failed [october-nineteen-winter-maine] - 'NoneType' object is not callable : Traceback (most recent call last): File "/home/konrad/.local/lib/python3.10/site-packages/django_q/cluster.py", line 432, in worker res = f(*task["args"], **task["kwargs"]) TypeError: 'NoneType' object is not callable 17:19:55 [Q] INFO Process-1:1 processing [october-nineteen-winter-maine] 17:19:55 [Q] ERROR Failed [october-nineteen-winter-maine] - 'NoneType' object is not callable : Traceback (most recent call last): File "/home/konrad/.local/lib/python3.10/site-packages/django_q/cluster.py", line 432, in worker res = f(*task["args"], **task["kwargs"]) TypeError: 'NoneType' object is not callable 17:19:55 [Q] INFO Enqueued 38698
@SergeoLacruz can you share a screenshot of the "scheduled tasks" in the admin page?
@SergeoLacruz could you try to delete all tasks (in admin) and restart the server? I am interested if the error reappears. Would you be able to supply the function (I believe it is
member_func) that is causing the problem?
I did not see the question, sorry.
Yes the error reappears.
I selected BACKGROUND TASKS -> Scheduled tasks in the admin interface and deleted all.
Restarted server and worker
The function is in the ~/src/InvenTree/plugin/samples/integration/scheduled_task.py
I just activate the sample without any modifications.
@SergeoLacruz yep, I found the same error in the sample plugin too :)
The error message is gone. But the expected output of member_func does still not appear.
Instead I get in the log:
21:47:05 [Q] INFO Process-1:1 processing [potato-asparagus-quiet-nitrogen] Plugin registry has no record of plugin 'schedule' 21:47:05 [Q] INFO Processed [potato-asparagus-quiet-nitrogen] 21:48:35 [Q] INFO Enqueued 45179
Just activate the ScheduledTasksPlugin
|Issue Title||Created Date||Updated Date|