Skip to content

Conversation

leeeboo
Copy link

@leeeboo leeeboo commented Mar 12, 2018

Question:

When gores worker works on k8s, the worker id is based an the container name which is given by k8s.
It will cause the "Pruning dead worker" not work. So the worker list will be add every time when the new worker POD created.

Solution:

I made 2 changes:

  1. Add last active time for each worker. And add CleanDeadWorkers for developer can do manually cleaning.

  2. Add graceful shutdown in function "func (disp *Dispatcher) Start(tasks *map[string]interface{}) error". It will caught system shutdown sig and UnregisterWorker all workers before "wg.done()".

@wang502 wang502 self-assigned this Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants