waggle-sensor / plugin-imagesampler

A simple plugin that samples images from a stream
0 stars 0 forks source link

Open a stream right before sampling #1

Closed gemblerz closed 3 years ago

gemblerz commented 3 years ago

The sampler may not need to hold an opened stream as the stream may get terminated by any external reasons. The sampler then keeps failing on getting a sample image and the orchestrator (i.e., Kubernetes) may not catch it as the plugin would seem running okay.

It would be safer and more resource-efficient if the sampler opens up a stream right before sampling. This ensures if the input source is connectable. If it fails the sampler can terminate itself, which will inform a failure to the orchestrator.

gemblerz commented 3 years ago

The 0.2.0 release resolves this issue and opens up a target stream when sampling.

gemblerz commented 3 years ago

The 0.2.1 release DOES resolve this issue, not 0.2.0.