2024-11-30 23:05:22 +08:00
|
|
|
from dify_app import DifyApp
|
|
|
|
|
|
|
|
|
|
|
|
def init_app(app: DifyApp):
|
|
|
|
from commands import (
|
2025-03-20 14:33:32 +08:00
|
|
|
add_qdrant_index,
|
2025-03-21 21:30:35 +08:00
|
|
|
clear_free_plan_tenant_expired_logs,
|
2025-04-27 12:11:04 +09:00
|
|
|
clear_orphaned_file_records,
|
2024-11-30 23:05:22 +08:00
|
|
|
convert_to_agent_apps,
|
|
|
|
create_tenant,
|
2025-02-17 17:05:13 +08:00
|
|
|
extract_plugins,
|
|
|
|
extract_unique_plugins,
|
2024-11-30 23:05:22 +08:00
|
|
|
fix_app_site_missing,
|
2025-02-17 17:05:13 +08:00
|
|
|
install_plugins,
|
|
|
|
migrate_data_for_plugin,
|
2025-03-20 14:33:32 +08:00
|
|
|
old_metadata_migration,
|
2025-04-27 12:11:04 +09:00
|
|
|
remove_orphaned_files_on_storage,
|
2024-11-30 23:05:22 +08:00
|
|
|
reset_email,
|
|
|
|
reset_encrypt_key_pair,
|
|
|
|
reset_password,
|
2025-07-17 17:18:44 +08:00
|
|
|
setup_system_tool_oauth_client,
|
2024-11-30 23:05:22 +08:00
|
|
|
upgrade_db,
|
|
|
|
vdb_migrate,
|
|
|
|
)
|
|
|
|
|
|
|
|
cmds_to_register = [
|
|
|
|
reset_password,
|
|
|
|
reset_email,
|
|
|
|
reset_encrypt_key_pair,
|
|
|
|
vdb_migrate,
|
|
|
|
convert_to_agent_apps,
|
2025-03-20 14:33:32 +08:00
|
|
|
add_qdrant_index,
|
2024-11-30 23:05:22 +08:00
|
|
|
create_tenant,
|
|
|
|
upgrade_db,
|
|
|
|
fix_app_site_missing,
|
2025-02-17 17:05:13 +08:00
|
|
|
migrate_data_for_plugin,
|
|
|
|
extract_plugins,
|
|
|
|
extract_unique_plugins,
|
|
|
|
install_plugins,
|
2025-03-20 14:33:32 +08:00
|
|
|
old_metadata_migration,
|
2025-03-21 21:30:35 +08:00
|
|
|
clear_free_plan_tenant_expired_logs,
|
2025-04-27 12:11:04 +09:00
|
|
|
clear_orphaned_file_records,
|
|
|
|
remove_orphaned_files_on_storage,
|
2025-07-17 17:18:44 +08:00
|
|
|
setup_system_tool_oauth_client,
|
2024-11-30 23:05:22 +08:00
|
|
|
]
|
|
|
|
for cmd in cmds_to_register:
|
|
|
|
app.cli.add_command(cmd)
|