mesos / mesos-go

Go language bindings for Apache Mesos
Apache License 2.0
545 stars 146 forks source link

Add driver graceful shutdown option #273

Open janisz opened 7 years ago

janisz commented 7 years ago

There is no way to stop the driver after all messages are sent to Mesos. Add GracefulStop function to driver that will wait for all message to be delivered and then stop the driver. GracefulStop should be blocking.

medzin commented 7 years ago

This part looks like unfinished, internally MesosExecutorDriver uses TODO context: https://github.com/mesos/mesos-go/blob/master/executor/executor.go#L128

There should be a way to pass own Context (for example context.WithDeadline()) to Messenger interface used by driver to communicate with Mesos. It will allow to wait for the messages to be delivered or fail after defined time.