go-QCoordinator

command module
v0.0.0-...-08e2c59 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2020 License: BSD-2-Clause Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

go-QCoordinator

graph RL
W1((Worker 1)) 
W2((Worker 2)) 
W3((Worker 3)) 
Wn((Worker ...n)) 

Q1[Queue1] 
Q2[Queue2]
Q3[Queue3]
Q4[Queue4]

C[Queue Selector]

C -- select --> Q1
C -- select --> Q2
C -- select --> Q3
C -- select --> Q4

W1 -- process --> C
W2 -- process --> C
W3 -- process --> C
Wn -- process --> C
graph LR
A[Square Rect] -- Link text --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
graph RL
W1((Worker1)) 
W2((Worker2)) 
W3((Worker3)) 
W4((Worker4)) 
W5((Worker5)) 
W6((Worker6)) 
W7((Worker7)) 
W8((Worker8)) 

Q1[Queue1] 
Q2[Queue2]
Q3[Queue3]
Q4[Queue4]

W1 -- process --> Q1

W2 -- process --> Q2
W3 -- process --> Q2
W4 -- process --> Q2

W5 -- process --> Q3
W6 -- process --> Q3

W7 -- process --> Q4
W8 -- process --> Q4

Documentation

Overview

Signal Handling in goworker

To stop goworker, send a QUIT, TERM, or INT signal to the process. This will immediately stop job polling. There can be up to $CONCURRENCY jobs currently running, which will continue to run until they are finished.

Failure Modes

Like Resque, goworker makes no guarantees about the safety of jobs in the event of process shutdown. Workers must be both idempotent and tolerant to loss of the job in the event of failure.

If the process is killed with a KILL or by a system failure, there may be one job that is currently in the poller's buffer that will be lost without any representation in either the queue or the worker variable.

If you are running Goworker on a system like Heroku, which sends a TERM to signal a process that it needs to stop, ten seconds later sends a KILL to force the process to stop, your jobs must finish within 10 seconds or they may be lost. Jobs will be recoverable from the Redis database under

resque:worker:<hostname>:<process-id>-<worker-id>:<queues>

as a JSON object with keys queue, run_at, and payload, but the process is manual. Additionally, there is no guarantee that the job in Redis under the worker key has not finished, if the process is killed before goworker can flush the update to Redis.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址