feat: deregister worker on close
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -11,6 +11,17 @@ import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
const deregisterWorker = `-- name: DeregisterWorker :exec
|
||||
DELETE FROM worker_register
|
||||
WHERE
|
||||
worker_id = $1
|
||||
`
|
||||
|
||||
func (q *Queries) DeregisterWorker(ctx context.Context, workerID uuid.UUID) error {
|
||||
_, err := q.db.Exec(ctx, deregisterWorker, workerID)
|
||||
return err
|
||||
}
|
||||
|
||||
const getWorkers = `-- name: GetWorkers :many
|
||||
SELECT
|
||||
worker_id
|
||||
|
Reference in New Issue
Block a user