Merge pull request #27797 from backstage/freben/q

correctly measure stitching queue length
This commit is contained in:
Fredrik Adelöw
2024-11-23 20:52:16 +01:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-backend': patch
---
Correctly report stitching queue length
@@ -54,8 +54,7 @@ export function progressTracker(knex: Knex, logger: LoggerService) {
stitchingQueueCount.addCallback(async result => {
const total = await knex<DbRefreshStateRow>('refresh_state')
.count({ count: '*' })
.whereNotNull('next_stitch_at')
.where('next_stitch_at', '<=', knex.fn.now());
.whereNotNull('next_stitch_at');
result.observe(Number(total[0].count));
});