mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-04 23:17:20 +08:00
refactor: make download and transfer events durable
This commit is contained in:
+33
-3
@@ -13,8 +13,8 @@
|
||||
"runtime_to_db": [],
|
||||
"workflow_to_db": []
|
||||
},
|
||||
"edge_count": 6271,
|
||||
"edge_sha256": "0119519add8e4499684044fc69f3003c54cfca20bf04f4614a419374692d5a94",
|
||||
"edge_count": 6299,
|
||||
"edge_sha256": "f98ab7d05c884a07a881eff1ab34b1ba5023751f1e95b956debcbad54c385810",
|
||||
"edges": [
|
||||
"app -> app.runtime",
|
||||
"app -> app.runtime.compat",
|
||||
@@ -2438,6 +2438,19 @@
|
||||
"app.application.chain.context -> app.application",
|
||||
"app.application.chain.context -> app.application.chain",
|
||||
"app.application.chain.context -> app.application.chain.data",
|
||||
"app.application.chain.context -> app.application.chain.durable_events",
|
||||
"app.application.chain.durable_events -> app.application",
|
||||
"app.application.chain.durable_events -> app.application.history",
|
||||
"app.application.chain.durable_events -> app.domain",
|
||||
"app.application.chain.durable_events -> app.domain.context",
|
||||
"app.application.chain.durable_events -> app.domain.meta",
|
||||
"app.application.chain.durable_events -> app.domain.meta.metabase",
|
||||
"app.application.chain.durable_events -> app.domain.meta.metamusic",
|
||||
"app.application.chain.durable_events -> app.domain.metainfo",
|
||||
"app.application.chain.durable_events -> app.schemas",
|
||||
"app.application.chain.durable_events -> app.schemas.file",
|
||||
"app.application.chain.durable_events -> app.schemas.transfer",
|
||||
"app.application.chain.durable_events -> app.schemas.types",
|
||||
"app.application.dashboard -> app.schemas",
|
||||
"app.application.dashboard -> app.schemas.dashboard",
|
||||
"app.application.database -> app.application",
|
||||
@@ -5623,6 +5636,7 @@
|
||||
"app.schemas.event -> app.schemas.common",
|
||||
"app.schemas.event -> app.schemas.file",
|
||||
"app.schemas.event -> app.schemas.media",
|
||||
"app.schemas.event -> app.schemas.transfer",
|
||||
"app.schemas.event -> app.schemas.types",
|
||||
"app.schemas.file -> app.schemas",
|
||||
"app.schemas.file -> app.schemas.types",
|
||||
@@ -5841,6 +5855,18 @@
|
||||
"app.startup.cache_initializer -> app.adapters",
|
||||
"app.startup.cache_initializer -> app.adapters.cache",
|
||||
"app.startup.cache_initializer -> app.adapters.cache.backends",
|
||||
"app.startup.chain_events -> app.application",
|
||||
"app.startup.chain_events -> app.application.chain",
|
||||
"app.startup.chain_events -> app.application.chain.durable_events",
|
||||
"app.startup.chain_events -> app.application.history",
|
||||
"app.startup.chain_events -> app.application.outbox",
|
||||
"app.startup.chain_events -> app.db",
|
||||
"app.startup.chain_events -> app.db.oper",
|
||||
"app.startup.chain_events -> app.db.oper.downloadhistory",
|
||||
"app.startup.chain_events -> app.db.oper.transferhistory",
|
||||
"app.startup.chain_events -> app.db.uow",
|
||||
"app.startup.chain_events -> app.startup",
|
||||
"app.startup.chain_events -> app.startup.outbox",
|
||||
"app.startup.command_initializer -> app.application",
|
||||
"app.startup.command_initializer -> app.application.commands",
|
||||
"app.startup.command_initializer -> app.command",
|
||||
@@ -5950,6 +5976,7 @@
|
||||
"app.startup.modules_initializer -> app.application.chain",
|
||||
"app.startup.modules_initializer -> app.application.chain.context",
|
||||
"app.startup.modules_initializer -> app.application.chain.data",
|
||||
"app.startup.modules_initializer -> app.application.chain.durable_events",
|
||||
"app.startup.modules_initializer -> app.application.configuration",
|
||||
"app.startup.modules_initializer -> app.application.database",
|
||||
"app.startup.modules_initializer -> app.application.history",
|
||||
@@ -6026,6 +6053,7 @@
|
||||
"app.startup.modules_initializer -> app.schemas.types",
|
||||
"app.startup.modules_initializer -> app.startup",
|
||||
"app.startup.modules_initializer -> app.startup.agent_initializer",
|
||||
"app.startup.modules_initializer -> app.startup.chain_events",
|
||||
"app.startup.modules_initializer -> app.startup.context",
|
||||
"app.startup.modules_initializer -> app.startup.database",
|
||||
"app.startup.modules_initializer -> app.startup.managed_resources_initializer",
|
||||
@@ -6288,7 +6316,7 @@
|
||||
"app.workflow.actions.transfer_file -> app.workflow",
|
||||
"app.workflow.actions.transfer_file -> app.workflow.actions"
|
||||
],
|
||||
"module_count": 782,
|
||||
"module_count": 784,
|
||||
"modules": [
|
||||
"app",
|
||||
"app.adapters",
|
||||
@@ -6542,6 +6570,7 @@
|
||||
"app.application.chain",
|
||||
"app.application.chain.context",
|
||||
"app.application.chain.data",
|
||||
"app.application.chain.durable_events",
|
||||
"app.application.commands",
|
||||
"app.application.configuration",
|
||||
"app.application.dashboard",
|
||||
@@ -7034,6 +7063,7 @@
|
||||
"app.startup",
|
||||
"app.startup.agent_initializer",
|
||||
"app.startup.cache_initializer",
|
||||
"app.startup.chain_events",
|
||||
"app.startup.command_initializer",
|
||||
"app.startup.context",
|
||||
"app.startup.database",
|
||||
|
||||
+19
-7
@@ -1441,10 +1441,10 @@
|
||||
"EventType.DownloadAdded": {
|
||||
"delivery": "durable_required",
|
||||
"error_behavior": "notify",
|
||||
"legacy_reason": "现有插件 payload 尚未收敛为稳定 model,保留原始 dict ABI",
|
||||
"legacy_reason": null,
|
||||
"mode": "broadcast",
|
||||
"ordering": "priority_queue",
|
||||
"payload_contract": "legacy_dict",
|
||||
"payload_contract": "DownloadAddedEventData",
|
||||
"sensitive_fields": [],
|
||||
"visibility": "plugin_public"
|
||||
},
|
||||
@@ -1651,20 +1651,20 @@
|
||||
"EventType.TransferComplete": {
|
||||
"delivery": "durable_required",
|
||||
"error_behavior": "notify",
|
||||
"legacy_reason": "现有插件 payload 尚未收敛为稳定 model,保留原始 dict ABI",
|
||||
"legacy_reason": null,
|
||||
"mode": "broadcast",
|
||||
"ordering": "priority_queue",
|
||||
"payload_contract": "legacy_dict",
|
||||
"payload_contract": "TransferResultEventData",
|
||||
"sensitive_fields": [],
|
||||
"visibility": "plugin_public"
|
||||
},
|
||||
"EventType.TransferFailed": {
|
||||
"delivery": "durable_required",
|
||||
"error_behavior": "notify",
|
||||
"legacy_reason": "现有插件 payload 尚未收敛为稳定 model,保留原始 dict ABI",
|
||||
"legacy_reason": null,
|
||||
"mode": "broadcast",
|
||||
"ordering": "priority_queue",
|
||||
"payload_contract": "legacy_dict",
|
||||
"payload_contract": "TransferResultEventData",
|
||||
"sensitive_fields": [],
|
||||
"visibility": "plugin_public"
|
||||
},
|
||||
@@ -2032,6 +2032,10 @@
|
||||
"producers": [
|
||||
{
|
||||
"caller": "app.chain.download",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"caller": "app.startup.modules_initializer",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
@@ -2274,6 +2278,10 @@
|
||||
"producers": [
|
||||
{
|
||||
"caller": "app.chain.transfer",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"caller": "app.startup.modules_initializer",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
@@ -2283,6 +2291,10 @@
|
||||
"producers": [
|
||||
{
|
||||
"caller": "app.chain.transfer",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"caller": "app.startup.modules_initializer",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
@@ -2320,7 +2332,7 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"producer_count": 70
|
||||
"producer_count": 76
|
||||
},
|
||||
"module_method_specs": {
|
||||
"download_file": {
|
||||
|
||||
+3
-13
@@ -2,11 +2,11 @@
|
||||
"model_decorators": {
|
||||
"by_kind": {
|
||||
"async_db_query": 49,
|
||||
"async_db_update": 13,
|
||||
"async_db_update": 12,
|
||||
"db_query": 75,
|
||||
"db_update": 41
|
||||
"db_update": 40
|
||||
},
|
||||
"count": 178,
|
||||
"count": 176,
|
||||
"methods": [
|
||||
{
|
||||
"decorator": "async_db_query",
|
||||
@@ -463,11 +463,6 @@
|
||||
"file": "app/db/models/siteuserdata.py",
|
||||
"method": "SiteUserData.get_latest"
|
||||
},
|
||||
{
|
||||
"decorator": "async_db_update",
|
||||
"file": "app/db/models/subscribe.py",
|
||||
"method": "Subscribe.async_delete_by_media_identity"
|
||||
},
|
||||
{
|
||||
"decorator": "async_db_query",
|
||||
"file": "app/db/models/subscribe.py",
|
||||
@@ -513,11 +508,6 @@
|
||||
"file": "app/db/models/subscribe.py",
|
||||
"method": "Subscribe.async_list_by_username"
|
||||
},
|
||||
{
|
||||
"decorator": "db_update",
|
||||
"file": "app/db/models/subscribe.py",
|
||||
"method": "Subscribe.delete_by_media_identity"
|
||||
},
|
||||
{
|
||||
"decorator": "db_query",
|
||||
"file": "app/db/models/subscribe.py",
|
||||
|
||||
Reference in New Issue
Block a user