Skip to content

refactor(functions): deslop cron scheduler from #1507 - #1599

Merged
cursor[bot] merged 3 commits into
feat/functions-cron-schedulerfrom
cursor/deslop-functions-cron-3a95
Sep 10, 2026
Merged

cursor[bot] merged 3 commits into
feat/functions-cron-schedulerfrom
cursor/deslop-functions-cron-3a95

Conversation

@ChrisPdgn

@ChrisPdgn ChrisPdgn commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Problem

PR #1507’s cron scheduler works, but the new code was noisy: nested try/catch in refreshRoutes, a duplicate config.active check, tests sitting next to controllers, and unrelated 2FA / pnpm-workspace drive-bys.

Summary

Cleanup only — scheduling, drain, and lock behavior are unchanged.

  • Flatten refreshRoutes to one try per function; cron prep failures still skip that function
  • Drop the inner config.active check and the discarded CronQueueController.getInstance() call
  • Extract the BullMQ worker handler and count register/update only after queue.add succeeds
  • Move unit tests to modules/functions/src/__tests__/
  • Revert unrelated generateSecret / allowBuilds changes from the cron PR

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Build-related changes
  • Other (please describe)

Does this PR introduce a breaking change?

  • Yes
  • No

The PR fulfills these requirements:

  • It's submitted to the main branch

This is a cleanup PR into feat/functions-cron-scheduler (#1507).

Test plan

  • pnpm --filter @conduitplatform/functions test — 19/19 passed
  • pnpm --filter @conduitplatform/functions exec tsc --noEmit
Open in Web Open in Cursor 

cursoragent and others added 3 commits September 10, 2026 12:22
Flatten refreshRoutes, drop redundant cron prep/active checks, and move
unit tests into src/__tests__. Revert unrelated 2FA and pnpm allowBuilds
drive-bys from the cron PR.

Co-authored-by: Christina Papadogianni <ChrisPdgn@users.noreply.github.com>
TypeScript 6 infers Array<number | undefined>.reduce as possibly
undefined; use an explicit loop so tsc --noEmit stays clean.

Co-authored-by: Christina Papadogianni <ChrisPdgn@users.noreply.github.com>
Co-authored-by: Christina Papadogianni <ChrisPdgn@users.noreply.github.com>
@cursor
cursor Bot merged commit c70ed1d into feat/functions-cron-scheduler Sep 10, 2026
12 checks passed
@cursor
cursor Bot deleted the cursor/deslop-functions-cron-3a95 branch September 10, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants