mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-07 00:16:57 +08:00
feat: make subscribe reports durable
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user