MCPcopy Index your code
hub / github.com/coder/coder / AcquireNotificationMessages

Method AcquireNotificationMessages

coderd/database/querier.go:36–36  ·  view source on GitHub ↗

Acquires the lease for a given count of notification messages, to enable concurrent dequeuing and subsequent sending. Only rows that aren't already leased (or ones which are leased but have exceeded their lease period) are returned. A "lease" here refers to a notifier taking ownership of a notifica

(ctx context.Context, arg AcquireNotificationMessagesParams)

Source from the content-addressed store, hash-verified

34 // See: https://www.postgresql.org/docs/9.5/sql-select.html#SQL-FOR-UPDATE-SHARE
35 //
36 AcquireNotificationMessages(ctx context.Context, arg AcquireNotificationMessagesParams) ([]AcquireNotificationMessagesRow, error)
37 // Acquires the lock for a single job that isn't started, completed,
38 // canceled, and that matches an array of provisioner types.
39 //

Callers 3

TestNotificationsMethod · 0.65

Implementers 5

sqlQueriercoderd/database/db.go
queryMetricsStorecoderd/database/dbmetrics/querymetrics
queriercoderd/database/dbauthz/dbauthz.go
MockStorecoderd/database/dbmock/dbmock.go
MockStoreMockRecordercoderd/database/dbmock/dbmock.go

Calls

no outgoing calls

Tested by 1

TestNotificationsMethod · 0.52