fix: stitching queue gauge to not include entities from the future
Signed-off-by: zcmander <zcmander@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog-backend': patch
|
||||
---
|
||||
|
||||
Fixed bug in stitching queue gauge that included entities that are scheduled in the future.
|
||||
@@ -54,7 +54,8 @@ export function progressTracker(knex: Knex, logger: LoggerService) {
|
||||
stitchingQueueCount.addCallback(async result => {
|
||||
const total = await knex<DbRefreshStateRow>('refresh_state')
|
||||
.count({ count: '*' })
|
||||
.whereNotNull('next_stitch_at');
|
||||
.whereNotNull('next_stitch_at')
|
||||
.where('next_stitch_at', '<=', knex.fn.now());
|
||||
result.observe(Number(total[0].count));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user