vitrivr / cineast

Cineast is a multi-feature content-based mulitmedia retrieval engine. It is capable of retrieving images, audio- and video sequences as well as 3d models based on edge or color sketches, textual descriptions and example objects.
MIT License
56 stars 51 forks source link

Fixing CLI not exiting properly #350

Closed silvanheller closed 1 year ago

silvanheller commented 1 year ago

This PR fixes #349. It does not interfere with the aim of #345, as there is a while(true) loop if the CLI is not enabled.

lucaro commented 1 year ago

Does this actually trigger the shutdown hook to close the API properly or does it just kill the process? Wouldn't it be cleaner to only register the shutdown hook when the CLI is not enabled and otherwise handle the shutdown mechanism as before?

Spiess commented 1 year ago

I have tested this with the CLI enabled and it produces the log output from the shutdown hook, so it appears to be closed correctly as far as I can tell.

lucaro commented 1 year ago

ok, good enough then I guess maybe a comment at that point would be nice to explicitly point this out, as it is not obvious (or at least is wasn't to me)