简单的定时任务--ok

This commit is contained in:
yml2213
2026-05-14 17:59:45 +08:00
parent b6c493d5e7
commit f7f3289d04
19 changed files with 954 additions and 5 deletions
@@ -82,6 +82,7 @@ export function notifyCloudtentaclesAuthExpired({
pathname = '',
errorCode = '',
message = '',
cooldownSeconds = 600,
} = {}) {
return notifyInternalSafely({
title: 'cloudtentacles 登录已过期',
@@ -92,6 +93,25 @@ export function notifyCloudtentaclesAuthExpired({
].join('\n'),
category: 'cloudtentacles_auth_expired',
cooldownKey: ['cloudtentacles_auth_expired', pathname, errorCode].join(':'),
cooldownMs: Number(cooldownSeconds || 600) * 1000,
})
}
export function notifyCloudtentaclesAssetLow({
asset = 0,
threshold = 500,
cooldownSeconds = 1800,
} = {}) {
return notifyInternalSafely({
title: '快手 Cloud 余额低于阈值',
body: [
`当前余额:${Number(asset || 0)}`,
`提醒阈值:${Number(threshold || 0)}`,
'请及时补充 cloudtentacles 余额,避免自动履约失败。',
].join('\n'),
category: 'cloudtentacles_asset_low',
cooldownKey: ['cloudtentacles_asset_low', threshold].join(':'),
cooldownMs: Number(cooldownSeconds || 1800) * 1000,
})
}