Skip to content

Submit jobs without doing work? #354

Answered by brandur
assembly-winston asked this question in Q&A
Discussion options

You must be logged in to vote

@assembly-winston Just leave out the Config.Queues property, and a client will become insert-only, and not perform any background work.

// Config is the configuration for a Client.
type Config struct {
	...

	// Queues is a list of queue names for this client to operate on along with
	// configuration for the queue like the maximum number of workers to run for
	// each queue.
	//
	// This field may be omitted for a program that's only queueing jobs rather
	// than working them. If it's specified, then Workers must also be given.
	Queues map[string]QueueConfig

You can also leave out Config.Workers from an insert-only client, but it's a little better to leave it in because if you do, River …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bgentry
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #353 on May 15, 2024 12:25.