Submit jobs without doing work? #354
-
If I have say, 2 servers that submit jobs to a river queue but I only want 1 of them to be doing background work, what is the way to do that? Can the server not intended to do work do InsertTx(SomeArgs) for a SomeWorker which we didn't river.AddWorkers(SomeWorker{}) on? Sorry if that was confusing. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@assembly-winston Just leave out the // 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 |
Beta Was this translation helpful? Give feedback.
@assembly-winston Just leave out the
Config.Queues
property, and a client will become insert-only, and not perform any background work.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 …