Clear MPD state on non-0 exit from MPD song sensor
authorSiraaj Khandkar <siraaj@khandkar.net>
Mon, 13 Aug 2018 19:43:06 +0000 (15:43 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Mon, 13 Aug 2018 19:43:06 +0000 (15:43 -0400)
commit7a2b16ba7175f07e0ae54e0527475c75e8cc1210
tree9052f60164140e8a88343817340b264cecf5f675
parent1b82be542b4db50148ddcae94713cfe8ecbeec01
Clear MPD state on non-0 exit from MPD song sensor

This is only half-arse general solution - while it catches and propagates non-0
exits for all sensors, not all sensors will actually propagate failures from
middles of their pipelines; and controller only handles the mpd case here.

The right thing to do seems to be to save the current timestamp value and
mark every key in the db with it, then only use values that are fresh-enough.
This needs a re-organization of how values are formatted by the sensors and
stored by the controller.

For error-handling we need to enable pipefail option on all sensor scripts,
but, how to parse and handle errors _well_? It seems that shell/awk are no
longer an advantage...
bin/khatus
bin/khatus_controller
This page took 0.024407 seconds and 4 git commands to generate.