Skip to content

Conversation

@jumski
Copy link
Contributor

@jumski jumski commented Dec 4, 2025

Add worker_functions table and stopped_at column to workers

This PR introduces a new worker_functions table to track which edge functions should be pinged by the ensure_workers() cron job. The table includes configuration options like:

  • enabled flag to control whether a function should be pinged
  • heartbeat_timeout_seconds to define when a worker is considered dead
  • Timestamps for creation and updates

Additionally, adds a stopped_at column to the existing workers table to properly track when workers are stopped.

The changes include:

  • Schema definitions in core schemas
  • Migration script for Supabase
  • Updated TypeScript type definitions

@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2025

⚠️ No Changeset found

Latest commit: 3d32459

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor Author

jumski commented Dec 4, 2025

@nx-cloud
Copy link

nx-cloud bot commented Dec 4, 2025

View your CI Pipeline Execution ↗ for commit 3d32459

Command Status Duration Result
nx run edge-worker:test:integration ✅ Succeeded 3m 48s View ↗
nx run client:e2e ✅ Succeeded 2m 51s View ↗
nx run edge-worker:e2e ✅ Succeeded 45s View ↗
nx run cli:e2e ✅ Succeeded 3s View ↗
nx affected -t verify-exports --base=origin/mai... ✅ Succeeded 3s View ↗
nx affected -t build --configuration=production... ✅ Succeeded 24s View ↗
nx affected -t lint typecheck test --parallel -... ✅ Succeeded 23s View ↗
nx run core:pgtap ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-08 08:32:49 UTC

@jumski jumski changed the base branch from 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ to graphite-base/504 December 4, 2025 14:41
@jumski jumski force-pushed the graphite-base/504 branch from a30c83e to 1004149 Compare December 4, 2025 15:03
@jumski jumski force-pushed the 12-04-add_worker_functions_table_and_stopped_at_column_to_workers branch from 6f48d3f to b0378fa Compare December 4, 2025 15:03
@jumski jumski changed the base branch from graphite-base/504 to 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ December 4, 2025 15:03
@jumski jumski changed the base branch from 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ to graphite-base/504 December 5, 2025 07:18
@jumski jumski force-pushed the graphite-base/504 branch from 1004149 to d2e6ef7 Compare December 5, 2025 07:20
@jumski jumski force-pushed the 12-04-add_worker_functions_table_and_stopped_at_column_to_workers branch from b0378fa to 03ec709 Compare December 5, 2025 07:20
@jumski jumski changed the base branch from graphite-base/504 to 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ December 5, 2025 07:20
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from d2e6ef7 to b3ec5c2 Compare December 5, 2025 09:24
@jumski jumski force-pushed the 12-04-add_worker_functions_table_and_stopped_at_column_to_workers branch 2 times, most recently from c6ddeaf to be78079 Compare December 5, 2025 10:04
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from b3ec5c2 to 44c5035 Compare December 5, 2025 10:04
@jumski jumski force-pushed the 12-04-add_worker_functions_table_and_stopped_at_column_to_workers branch from be78079 to e802d13 Compare December 5, 2025 13:05
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from 44c5035 to e9163f7 Compare December 5, 2025 13:05
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from e9163f7 to f2d0658 Compare December 5, 2025 22:53
@jumski jumski force-pushed the 12-04-add_worker_functions_table_and_stopped_at_column_to_workers branch from e802d13 to 4e01611 Compare December 5, 2025 22:53
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from f2d0658 to e315766 Compare December 7, 2025 16:45
@jumski jumski force-pushed the 12-04-add_worker_functions_table_and_stopped_at_column_to_workers branch from 4e01611 to 3fc3ef7 Compare December 7, 2025 16:45
@jumski jumski force-pushed the 12-04-add_worker_functions_table_and_stopped_at_column_to_workers branch from 3fc3ef7 to 3aae55a Compare December 8, 2025 05:23
@jumski jumski force-pushed the 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ branch from e315766 to 3eab03e Compare December 8, 2025 05:23
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

🔍 Preview Deployment: Website

Deployment successful!

🔗 Preview URL: https://pr-504.pgflow.pages.dev

📝 Details:

  • Branch: 12-04-add_worker_functions_table_and_stopped_at_column_to_workers
  • Commit: efbe96fc8b40494c20e795d0b50b16e1e1f756ac
  • View Logs

_Last updated: _

Copy link
Contributor Author

jumski commented Dec 8, 2025

Merge activity

  • Dec 8, 8:07 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Dec 8, 8:26 AM UTC: Graphite rebased this pull request as part of a merge.
  • Dec 8, 8:33 AM UTC: @jumski merged this pull request with Graphite.

@jumski jumski changed the base branch from 12-04-remove_p_mode_param_from_ensure_flow_compiled_auto-detect_via_is_local_ to graphite-base/504 December 8, 2025 08:17
@jumski jumski changed the base branch from graphite-base/504 to main December 8, 2025 08:24
@jumski jumski force-pushed the 12-04-add_worker_functions_table_and_stopped_at_column_to_workers branch from 3aae55a to 3d32459 Compare December 8, 2025 08:25
@jumski jumski merged commit 1a75ef1 into main Dec 8, 2025
10 of 12 checks passed
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

🚀 Production Deployment: Website

Successfully deployed to production!

🔗 Production URL: https://pgflow.dev

📝 Details:

  • Commit: 1a75ef1274538e8aa673422677abc8042edc4641
  • View Logs

Deployed at: 2025-12-08T09:33:24+01:00

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