修复发布后供应商镜像刷新重复等锁 (#1569)
This commit is contained in:
parent
28abecf007
commit
e6bd259b43
@ -273,7 +273,10 @@ EOF
|
||||
chmod 644 /etc/cron.d/caiwu-jiansun-snapshots
|
||||
|
||||
# 本次发布立即校正一次供应商采购入库数据,避免等待次日定时任务。
|
||||
/usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock /usr/bin/docker exec -u www-data caiwu_app php artisan business-mirror:sync-supplier-payable-forecast --quiet >/dev/null 2>&1 || true
|
||||
# 关闭子进程继承的发布锁和同步锁,等激活结束后再单独取得同步锁。
|
||||
/usr/bin/nohup /usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock \
|
||||
/usr/bin/docker exec -u www-data caiwu_app php artisan business-mirror:sync-supplier-payable-forecast --quiet \
|
||||
</dev/null >/dev/null 2>&1 8>&- 9>&- &
|
||||
|
||||
# OA 流程明细每 15 分钟同步结构化数据,并在同一批处理中增量补发票;
|
||||
# 审批快照再按 60 分钟新鲜度限频轮转,避免对长期不变的流程重复调用官方接口。
|
||||
|
||||
@ -277,7 +277,10 @@ EOF
|
||||
chmod 644 /etc/cron.d/caiwu-jiansun-snapshots
|
||||
|
||||
# 本次发布立即校正一次供应商采购入库数据,避免等待次日定时任务。
|
||||
/usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock /usr/bin/docker exec -u www-data caiwu_app php artisan business-mirror:sync-supplier-payable-forecast --quiet >/dev/null 2>&1 || true
|
||||
# 关闭子进程继承的发布锁和同步锁,等激活结束后再单独取得同步锁。
|
||||
/usr/bin/nohup /usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock \
|
||||
/usr/bin/docker exec -u www-data caiwu_app php artisan business-mirror:sync-supplier-payable-forecast --quiet \
|
||||
</dev/null >/dev/null 2>&1 8>&- 9>&- &
|
||||
|
||||
# OA 流程明细每 15 分钟同步结构化数据,并在同一批处理中增量补发票;
|
||||
# 审批快照再按 60 分钟新鲜度限频轮转,避免对长期不变的流程重复调用官方接口。
|
||||
|
||||
@ -251,7 +251,12 @@ class BusinessMirrorScheduleTest extends TestCase
|
||||
$script,
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
'# 本次发布立即校正一次供应商采购入库数据,避免等待次日定时任务。',
|
||||
'/usr/bin/nohup /usr/bin/flock -w 1800 /run/caiwu-upstream-sync.lock',
|
||||
$contents,
|
||||
$script,
|
||||
);
|
||||
$this->assertStringContainsString(
|
||||
'</dev/null >/dev/null 2>&1 8>&- 9>&- &',
|
||||
$contents,
|
||||
$script,
|
||||
);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user