MCPcopy Create free account
hub / github.com/riverqueue/river / QueueUpdate

Method QueueUpdate

client.go:2818–2837  ·  view source on GitHub ↗

QueueUpdate updates a queue's settings in the database. These settings override the settings in the client (if applied).

(ctx context.Context, name string, params *QueueUpdateParams)

Source from the content-addressed store, hash-verified

2816// QueueUpdate updates a queue's settings in the database. These settings
2817// override the settings in the client (if applied).
2818func (c *Client[TTx]) QueueUpdate(ctx context.Context, name string, params *QueueUpdateParams) (*rivertype.Queue, error) {
2819 tx, err := c.driver.GetExecutor().Begin(ctx)
2820 if err != nil {
2821 return nil, err
2822 }
2823 defer dbutil.RollbackWithoutCancel(ctx, tx)
2824
2825 queue, controlEvent, err := c.queueUpdate(ctx, tx, name, params)
2826 if err != nil {
2827 return nil, err
2828 }
2829
2830 if err := tx.Commit(ctx); err != nil {
2831 return nil, err
2832 }
2833
2834 c.notifyProducerWithoutListenerQueueControlEvent(name, controlEvent)
2835
2836 return queue, nil
2837}
2838
2839// QueueUpdateTx updates a queue's settings in the database. These settings
2840// override the settings in the client (if applied).

Callers

nothing calls this directly

Calls 6

queueUpdateMethod · 0.95
RollbackWithoutCancelFunction · 0.92
BeginMethod · 0.65
GetExecutorMethod · 0.65
CommitMethod · 0.65

Tested by

no test coverage detected