MCPcopy Index your code
hub / github.com/riverqueue/river / Remove

Method Remove

client.go:2979–2988  ·  view source on GitHub ↗

Remove removes a queue from the client, stopping the producer if the client is running. It waits for any jobs currently being worked in the queue to complete before returning. If the provided context is done before the producer has fully stopped, Remove returns the context's error and does not full

(ctx context.Context, queueName string)

Source from the content-addressed store, hash-verified

2977// Returns an error if the client is not configured to execute jobs or if the
2978// specified queue does not exist.
2979func (b *QueueBundle) Remove(ctx context.Context, queueName string) error {
2980 if !b.clientWillExecuteJobs {
2981 return errors.New("client is not configured to execute jobs, cannot remove queue")
2982 }
2983
2984 b.startStopMu.Lock()
2985 defer b.startStopMu.Unlock()
2986
2987 return b.producerRemove(ctx, queueName)
2988}
2989
2990// Generates a default client ID using the current hostname and time.
2991func defaultClientID(startedAt time.Time) string {

Callers 5

Test_Client_CommonFunction · 0.45
Test_Client_MaintenanceFunction · 0.45
SchemaDropMethod · 0.45

Calls 1

producerRemoveMethod · 0.80

Tested by 4

Test_Client_CommonFunction · 0.36
Test_Client_MaintenanceFunction · 0.36