You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if i set @taskiq_broker.task exc that schedule parameter is required.
if I set it this way (@taskiq_broker.task(schedule=[{"cron": "0 0 31 2 *"}])) and try to run it manually in lifespan fastapi
bootstrap.py:
Exc:
File "/home/shakdevich/Dropbox/python/Funtech/scannerservice/project/core/bootstrap.py", line 34, in lifespan
await run_tasks()
File "/home/shakdevich/Dropbox/python/Funtech/scannerservice/project/core/bootstrap.py", line 75, in run_tasks
from broker.tasks import sync_init_bets
File "/home/shakdevich/Dropbox/python/Funtech/scannerservice/project/broker/tasks.py", line 24, in
@taskiq_broker.task(schedule=[{"0 0 31 2 *"}}])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shakdevich/.cache/pypoetry/virtualenvs/scannerservice-Wg8Y1DKw-py3.12/lib/python3.12/site-packages/taskiq/decor.py", line 98, in call
return self.original_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BrokerWrapper.task..__taskiq_original() takes 0 positional arguments but 1 was given
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
I need to run the task once.
if i set
@taskiq_broker.task
exc that schedule parameter is required.if I set it this way (
@taskiq_broker.task(schedule=[{"cron": "0 0 31 2 *"}])
) and try to run it manually in lifespan fastapibootstrap.py:
Exc:
File "/home/shakdevich/Dropbox/python/Funtech/scannerservice/project/core/bootstrap.py", line 34, in lifespan
await run_tasks()
File "/home/shakdevich/Dropbox/python/Funtech/scannerservice/project/core/bootstrap.py", line 75, in run_tasks
from broker.tasks import sync_init_bets
File "/home/shakdevich/Dropbox/python/Funtech/scannerservice/project/broker/tasks.py", line 24, in
@taskiq_broker.task(schedule=[{"0 0 31 2 *"}}])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/shakdevich/.cache/pypoetry/virtualenvs/scannerservice-Wg8Y1DKw-py3.12/lib/python3.12/site-packages/taskiq/decor.py", line 98, in call
return self.original_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: BrokerWrapper.task..__taskiq_original() takes 0 positional arguments but 1 was given
The text was updated successfully, but these errors were encountered: