polygon-city / polygon-city-cli

Converts a CityGML file into GeoJSON footprint indexes and 3D models (obj & collada)
6 stars 1 forks source link

Give queues / workers time to shut down gracefully before exiting #11

Closed robhawkes closed 8 years ago

robhawkes commented 8 years ago

When forcing an exit (ctrl+c) or when the app exits automatically it currently does this naively and doesn't wait for things to finish before closing everything down (aside from a fixed delay). This causes remnants to remain in the system, such as not probably clearing up and removing the Redis queues. I believe this is because the workers are being shut down before the onComplete handlers are picked up to clean Redis.

It would be good if the queue workers were allowed to shut down gracefully before exiting, or at least give them a chance to and then enforce an exit if they don't do so within some time period.

robhawkes commented 8 years ago

A lot of improvements have recently landed around handling how the jobs exit. I'm going to close this and we can open issues for any specific problems.