feat: make subscribe reports durable

This commit is contained in:
jxxghp
2026-08-23 00:25:23 +08:00
parent dc9433f0de
commit a59f1b928a
8 changed files with 117 additions and 28 deletions
+6 -4
View File
@@ -958,9 +958,10 @@ class SubscribeChain(MusicSubscribeMixin, InteractionChainMixin, ChainBase):
"username": context.username,
"mediainfo": context.mediainfo.to_dict(),
})
MoviePilotServerHelper.sub_reg_async(
if not MoviePilotServerHelper.sub_reg_durable(
self.__subscribe_report_payload(context)
)
):
raise RuntimeError("订阅新增统计上报未确认")
async def __async_post_subscribe_added(
self,
@@ -993,9 +994,10 @@ class SubscribeChain(MusicSubscribeMixin, InteractionChainMixin, ChainBase):
"username": context.username,
"mediainfo": context.mediainfo.to_dict(),
})
await MoviePilotServerHelper.async_sub_reg(
if not await MoviePilotServerHelper.async_sub_reg_durable(
self.__subscribe_report_payload(context)
)
):
raise RuntimeError("订阅新增统计上报未确认")
@staticmethod
def __build_subscribe_create_context(