feat: move schedules to registered workers
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-01-18 13:18:12 +01:00
parent 1d4a72fd5f
commit 1cf9d23491
8 changed files with 140 additions and 3 deletions

View File

@@ -30,4 +30,4 @@ WHERE
-- name: PruneWorker :exec
DELETE FROM worker_register
WHERE
heart_beat <= now() - INTERVAL '10 minutes';
heart_beat <= now() - INTERVAL '1 minutes';

View File

@@ -69,7 +69,7 @@ func (q *Queries) Ping(ctx context.Context) (int32, error) {
const pruneWorker = `-- name: PruneWorker :exec
DELETE FROM worker_register
WHERE
heart_beat <= now() - INTERVAL '10 minutes'
heart_beat <= now() - INTERVAL '1 minutes'
`
func (q *Queries) PruneWorker(ctx context.Context) error {