Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it works good on Kubernetes. #7

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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