pelias / wof-admin-lookup

Who's on First Admin Lookup for the Pelias Geocoder
https://pelias.io
MIT License
9 stars 24 forks source link

gracefully handle shutting down workers before the service has finished instantiating #290

Closed missinglink closed 4 years ago

missinglink commented 4 years ago

bugfix for issue highlighted in https://github.com/pelias/polylines/issues/245

When the stream is /dev/null then there is a case for prematurely shutting down all worker nodes since they will not be required. As the code currently stands, this case is ignored and so the workers all remain running, which hangs the process.

Since this code is likely to be removed this year I didn't invest any time in refactoring the synchronous assignment of $this.pipService, instead I simply exposed an interface that can enumerate the workers and kill them.

orangejulius commented 4 years ago

Oh, nice. So it wasn't an issue with the stream pipeline in the polyline importer at all?