TTB-Network / python-openbmclapi

The Python version of OpenBMCLAPI.
https://python-openbmclapi.ttb-network.top/
21 stars 3 forks source link

:bug: `scheduler.py` 与 `clear_cache()` 的漏洞 #61

Closed SilianZ closed 6 months ago

SilianZ commented 6 months ago
Job "repeat.<locals>.wrapper_async (trigger: interval[0:06:00], next run at: 2024-05-02 06:33:39 UTC)" raised an exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/apscheduler/executors/base_py3.py", line 30, in run_coroutine_job
    retval = await job.func(*job.args, **job.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/python-openbmclapi/core/scheduler.py", line 101, in wrapper_async
    await handler(*args, **kwargs)
  File "/opt/python-openbmclapi/core/cluster.py", line 578, in clear_cache
    for key, file in sorted(
                     ^^^^^^^
TypeError: '<' not supported between instances of 'FileContentType' and 'FileContentType'
Run time of job "repeat.<locals>.wrapper_async (trigger: interval[0:00:05], next run at: 2024-05-02 06:16:09 UTC)" was missed by 0:00:01.323959
SilianZ commented 6 months ago

参考文档:https://zhuanlan.zhihu.com/p/336389147