mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
feat: add delete file finally
This commit is contained in:
parent
532dfd6ae8
commit
36cf784c9c
|
@ -45,9 +45,10 @@ def process_trace_tasks(file_info):
|
||||||
if trace_type:
|
if trace_type:
|
||||||
trace_info = trace_type(**trace_info)
|
trace_info = trace_type(**trace_info)
|
||||||
trace_instance.trace(trace_info)
|
trace_instance.trace(trace_info)
|
||||||
storage.delete(file_path)
|
|
||||||
logging.info(f"Processing trace tasks success, app_id: {app_id}")
|
logging.info(f"Processing trace tasks success, app_id: {app_id}")
|
||||||
except Exception:
|
except Exception:
|
||||||
failed_key = f"{OPS_TRACE_FAILED_KEY}_{app_id}"
|
failed_key = f"{OPS_TRACE_FAILED_KEY}_{app_id}"
|
||||||
redis_client.incr(failed_key)
|
redis_client.incr(failed_key)
|
||||||
logging.info(f"Processing trace tasks failed, app_id: {app_id}")
|
logging.info(f"Processing trace tasks failed, app_id: {app_id}")
|
||||||
|
finally:
|
||||||
|
storage.delete(file_path)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user