mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 01:39:52 +08:00
perf(cron): share global concurrency budget and streamline execution
Share durable permits across manual, scheduled and recovered runs, prioritize short ready tasks with aging, and record global queue occupancy. Reduce launch, log polling, dashboard and SQLite overhead while preserving transactional receipts, cancellation, recovery and script hook compatibility. Keep ordinary CRUD in ORM and bound SQL on measured execution hot paths. Fix supervisor descendant tracking, asynchronous log draining, concurrent log directory creation, Linux fallback launches and snapshot clock rollback. Include regression coverage, SQL audits and evolution/review documentation. Validation: five review rounds; local full suite 1478 passed, 28 platform skips; dev suites 415 passed, no failures/skips; backend types and formatting passed.
This commit is contained in:
1 parent
cddabbaf0e
commit
2f01f756d7
74 files changed
+6891
-837
No files matched your search
@@ -243,3 +243,19 @@ test('a live queue shows the resampled holders and preserves the measured dequeu
|
||||
/排队等待 <b>210 ms/,
|
||||
);
|
||||
});
|
||||
|
||||
test('shared budget occupancy is labelled as the global queue', () => {
|
||||
const { details } = render({
|
||||
state: 'queued',
|
||||
queued_at: base,
|
||||
queue_live_context: JSON.stringify({
|
||||
queue: 'global',
|
||||
limit: 1,
|
||||
occupied: 1,
|
||||
holders: [{ id: 'foreign-worker-run', name: '另一个 worker 的任务' }],
|
||||
}),
|
||||
});
|
||||
assert.match(details, /全局执行队列/);
|
||||
assert.match(details, /另一个 worker 的任务/);
|
||||
assert.doesNotMatch(details, /定时执行队列|手动执行队列/);
|
||||
});
|
||||
Reference in new issue
Block a user