tasks: Check task path for cached task

If path has changed, something else might have
changed, too.
This commit is contained in:
Ivan A. Melnikov 2024-11-28 17:59:13 +04:00
parent 8d14344594
commit e284750a57

View File

@ -62,6 +62,7 @@ def load_task(task_path, cached_task=None, now=None):
try:
mtime = st.st_mtime
if cached_task and mtime < cached_task.get('load_time', 0):
if cached_task.get('task_path') == task_path:
return cached_task
ctime = os.path.getmtime(os.path.join(task_path, 'task', 'id'))