chore: 按业务复杂度错峰分散金蝶BFI定时任务调度时间
原 6 个调度默认值全部压在整点边界(:00/:10/:20 同时起 4 个重任务),按复杂度错开起始分钟、频率不变、互不重叠:payResult :01/10min、receiptClaimPush :04/10min、autoSync.retry :05/10min、receivedInvoiceResult :08/10min、invoiceReceipt :16/30min、billLock.retry :02/5min;整点留缓冲,同步更新代码默认值、本地 yaml 兜底与 Nacos blade-dev.yaml
This commit is contained in:
+1
-1
@@ -51,7 +51,7 @@ public class InvoiceReceiptKingdeeSyncTask {
|
||||
private final BfiProperties bfiProperties;
|
||||
|
||||
/** 金蝶全票池同步调度,默认每30分钟执行一次 */
|
||||
@Scheduled(cron = "${thirdParty.bfi.invoiceReceipt.cron:0 */30 * * * ?}")
|
||||
@Scheduled(cron = "${thirdParty.bfi.invoiceReceipt.cron:0 16/30 * * * ?}")
|
||||
public void syncKingdeeInvoicePool() {
|
||||
if (!bfiProperties.getInvoiceReceipt().isSyncEnabled()) {
|
||||
return;
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public class KingdeeAutoSyncRetryTask {
|
||||
private final BfiProperties bfiProperties;
|
||||
|
||||
/** failed 定时重推调度,默认每10分钟执行一次 */
|
||||
@Scheduled(cron = "${thirdParty.bfi.autoSync.retryCron:0 */10 * * * ?}")
|
||||
@Scheduled(cron = "${thirdParty.bfi.autoSync.retryCron:0 5/10 * * * ?}")
|
||||
public void retryKingdeeFailed() {
|
||||
if (!bfiProperties.getAutoSync().isRetryEnabled()) {
|
||||
return;
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public class KingdeeBillLockRetryTask {
|
||||
private final BfiProperties bfiProperties;
|
||||
|
||||
/** 锁定补偿调度,默认每5分钟执行一次 */
|
||||
@Scheduled(cron = "${thirdParty.bfi.billLock.retryCron:0 */5 * * * ?}")
|
||||
@Scheduled(cron = "${thirdParty.bfi.billLock.retryCron:0 2/5 * * * ?}")
|
||||
public void retryFailedBillLocks() {
|
||||
if (!bfiProperties.getBillLock().isRetryEnabled()) {
|
||||
return;
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ public class PaymentKingdeeResultTask {
|
||||
private final BfiProperties bfiProperties;
|
||||
|
||||
/** 金蝶结果回写调度,默认每10分钟执行一次 */
|
||||
@Scheduled(cron = "${thirdParty.bfi.payResult.cron:0 */10 * * * ?}")
|
||||
@Scheduled(cron = "${thirdParty.bfi.payResult.cron:0 1/10 * * * ?}")
|
||||
public void syncKingdeePaymentResult() {
|
||||
if (!bfiProperties.getPayResult().isSyncEnabled()) {
|
||||
return;
|
||||
@@ -86,7 +86,7 @@ public class PaymentKingdeeResultTask {
|
||||
}
|
||||
|
||||
/** 金蝶收票单结果回写调度(异常回收/指定补偿/单号补登),默认每10分钟执行一次 */
|
||||
@Scheduled(cron = "${thirdParty.bfi.receivedInvoiceResult.cron:0 */10 * * * ?}")
|
||||
@Scheduled(cron = "${thirdParty.bfi.receivedInvoiceResult.cron:0 8/10 * * * ?}")
|
||||
public void syncKingdeeReceivedInvoiceResult() {
|
||||
if (!bfiProperties.getReceivedInvoiceResult().isSyncEnabled()) {
|
||||
return;
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ public class ReceiptClaimPushTask {
|
||||
private final BfiProperties bfiProperties;
|
||||
|
||||
/** 收款认领推送调度,默认每10分钟执行一次 */
|
||||
@Scheduled(cron = "${thirdParty.bfi.receiptClaimPush.cron:0 */10 * * * ?}")
|
||||
@Scheduled(cron = "${thirdParty.bfi.receiptClaimPush.cron:0 4/10 * * * ?}")
|
||||
public void pushClaimToKingdee() {
|
||||
if (!bfiProperties.getReceiptClaimPush().isSyncEnabled()) {
|
||||
return;
|
||||
|
||||
@@ -77,14 +77,14 @@ thirdParty:
|
||||
payResult:
|
||||
# 回写任务开关
|
||||
syncEnabled: ${BFI_PAY_RESULT_SYNC_ENABLED:true}
|
||||
# 调度 cron,默认每10分钟
|
||||
cron: ${BFI_PAY_RESULT_CRON:0 */10 * * * ?}
|
||||
# 调度 cron,默认每10分钟(:01 起步,错峰避让其他金蝶任务)
|
||||
cron: ${BFI_PAY_RESULT_CRON:0 1/10 * * * ?}
|
||||
# 收款认领推送金蝶定时任务(A301-3 收款认领结果推送)
|
||||
receiptClaimPush:
|
||||
# 推送任务开关,默认关闭(联调稳定后开启)
|
||||
syncEnabled: ${BFI_RECEIPT_CLAIM_PUSH_SYNC_ENABLED:false}
|
||||
# 调度 cron,默认每10分钟
|
||||
cron: ${BFI_RECEIPT_CLAIM_PUSH_CRON:0 */10 * * * ?}
|
||||
# 调度 cron,默认每10分钟(:04 起步,错峰避让其他金蝶任务)
|
||||
cron: ${BFI_RECEIPT_CLAIM_PUSH_CRON:0 4/10 * * * ?}
|
||||
# single-flight 分布式锁租约秒数,须大于最坏一轮耗时(逐认领人远程查公告+逐条推送),
|
||||
# 进程异常退出时锁在租约到期后自动释放
|
||||
lockLeaseSeconds: ${BFI_RECEIPT_CLAIM_PUSH_LOCK_LEASE_SECONDS:1800}
|
||||
@@ -98,8 +98,8 @@ thirdParty:
|
||||
invoiceReceipt:
|
||||
# 同步任务开关,默认关闭(上线先手动 POST /invoice-receipt/sync-invoice-pool 跑一次全窗口铺底)
|
||||
syncEnabled: ${BFI_INVOICE_RECEIPT_SYNC_ENABLED:false}
|
||||
# 调度 cron,默认每30分钟
|
||||
cron: ${BFI_INVOICE_RECEIPT_CRON:0 */30 * * * ?}
|
||||
# 调度 cron,默认每30分钟(:16 起步,错峰避让其他金蝶任务)
|
||||
cron: ${BFI_INVOICE_RECEIPT_CRON:0 16/30 * * * ?}
|
||||
# 增量窗口天数(按票池更新时间滚动)
|
||||
incrementDays: ${BFI_INVOICE_RECEIPT_INCREMENT_DAYS:30}
|
||||
# 同步发票种类白名单(逗号分隔票易通编码,如 26,27 数电普票/专票),为空不限制
|
||||
@@ -120,5 +120,5 @@ thirdParty:
|
||||
receipt: ${BFI_AUTO_SYNC_RECEIPT:false}
|
||||
# failed 单据定时重推开关(仅重推生成失败,不扫 unsynced 存量)
|
||||
retryEnabled: ${BFI_AUTO_SYNC_RETRY_ENABLED:false}
|
||||
# 重推调度 cron,默认每10分钟
|
||||
retryCron: ${BFI_AUTO_SYNC_RETRY_CRON:0 */10 * * * ?}
|
||||
# 重推调度 cron,默认每10分钟(:05 起步,错峰避让其他金蝶任务)
|
||||
retryCron: ${BFI_AUTO_SYNC_RETRY_CRON:0 5/10 * * * ?}
|
||||
|
||||
Reference in New Issue
Block a user