mirror of
https://github.com/PaiGramTeam/MibooGram.git
synced 2024-11-24 17:19:31 +00:00
🐛 Fix sign status update makes no redo job
This commit is contained in:
parent
435b1dc462
commit
114299f3ae
@ -225,6 +225,7 @@ class SignSystem(Plugin):
|
|||||||
async def do_sign_job(self, context: "ContextTypes.DEFAULT_TYPE", job_type: SignJobType):
|
async def do_sign_job(self, context: "ContextTypes.DEFAULT_TYPE", job_type: SignJobType):
|
||||||
include_status: List[TaskStatusEnum] = [
|
include_status: List[TaskStatusEnum] = [
|
||||||
TaskStatusEnum.STATUS_SUCCESS,
|
TaskStatusEnum.STATUS_SUCCESS,
|
||||||
|
TaskStatusEnum.ALREADY_CLAIMED,
|
||||||
TaskStatusEnum.TIMEOUT_ERROR,
|
TaskStatusEnum.TIMEOUT_ERROR,
|
||||||
TaskStatusEnum.NEED_CHALLENGE,
|
TaskStatusEnum.NEED_CHALLENGE,
|
||||||
]
|
]
|
||||||
@ -285,7 +286,8 @@ class SignSystem(Plugin):
|
|||||||
logger.error("执行自动签到时发生错误 user_id[%s]", user_id, exc_info=exc)
|
logger.error("执行自动签到时发生错误 user_id[%s]", user_id, exc_info=exc)
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
sign_db.status = TaskStatusEnum.STATUS_SUCCESS
|
if sign_db.status not in include_status:
|
||||||
|
sign_db.status = TaskStatusEnum.STATUS_SUCCESS
|
||||||
try:
|
try:
|
||||||
await self.sign_service.update(sign_db)
|
await self.sign_service.update(sign_db)
|
||||||
except StaleDataError:
|
except StaleDataError:
|
||||||
|
Loading…
Reference in New Issue
Block a user