diff --git a/.changeset/odd-worms-peel.md b/.changeset/odd-worms-peel.md new file mode 100644 index 0000000000..90e05f1e51 --- /dev/null +++ b/.changeset/odd-worms-peel.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend': patch +--- + +Correctly report stitching queue length diff --git a/plugins/catalog-backend/src/stitching/progressTracker.ts b/plugins/catalog-backend/src/stitching/progressTracker.ts index 8c305b4978..9e00a1a01b 100644 --- a/plugins/catalog-backend/src/stitching/progressTracker.ts +++ b/plugins/catalog-backend/src/stitching/progressTracker.ts @@ -54,8 +54,7 @@ export function progressTracker(knex: Knex, logger: LoggerService) { stitchingQueueCount.addCallback(async result => { const total = await knex('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)); });