Open everthought opened 1 year ago
Now it gets even stranger. The Tasks started again after 22 missed runs.
I have now tested the scheduler for several days. The problem only occurs when I use the SQL repo.
I tried to set the SQLalchemy engine to log the queries via echo=true. Unfortunately I get the error message here "AttributeError: 'scheduler_log' object has no attribute '_sa_instance_state'" see logs.txt logs.txt
After using the logs from the DB, I noticed that despite the setting of the id_field with the config:
repo=SQLRepo(engine=sec_db_engine, table="scheduler_log", model=MinimalRunRecord, id_field="id")
the logs are queryed from the DB using the "created" column.
Did i miss something in the config?
The documentation mentions that it is better to use an ID column, this may be the issue of the missed runs with after_success(fuc).
When I start the scheduler, it runs stable for some time, but withouht any msg, the after_success(fuc) stop running. Only the periodic timer functions are executed.
Screenshots from the DB log
The Scheduler implementation:
The Task implementation
I integrated it along with Fastapi