mirror of
https://github.com/open-webui/pipelines
synced 2025-05-11 16:10:45 +00:00
feat: move failing pipelines to failed dir
This commit is contained in:
parent
d0cf5b7bcb
commit
72ed9c537c
8
main.py
8
main.py
@ -118,6 +118,14 @@ async def load_module_from_path(module_name, module_path):
|
||||
raise Exception("No Pipeline class found")
|
||||
except Exception as e:
|
||||
print(f"Error loading module: {module_name}")
|
||||
|
||||
# Move the file to the error folder
|
||||
failed_pipelines_folder = os.path.join(PIPELINES_DIR, "failed")
|
||||
if not os.path.exists(failed_pipelines_folder):
|
||||
os.makedirs(failed_pipelines_folder)
|
||||
|
||||
failed_file_path = os.path.join(failed_pipelines_folder, f"{module_name}.py")
|
||||
os.rename(module_path, failed_file_path)
|
||||
print(e)
|
||||
return None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user