clear old MQTT topics
When we create a new experiment, the old experiment topics in MQTT hang around. This consumes resources. Eventually things will break. We should drop these old topics somehow.
- watchdog? Seems like a creep of it's use.
There's a new feature in mosquito CLI that makes this easy, something like:
mosquitto_sub -t 'pioreactor/+/#' -T 'pioreactor/+/$experiment' --remove-retained --retained-only -E
But it's only available on mosquitto 1.6+, and default Raspberry Pi OS has 1.5.7. So we will wait until bullseye release
Actually, I've slowly been having the job clean up after itself, ex: a5145f3a
In next release, the pioreactor/latest_experiment topic is being dropped 🍻
With that gone, there's a more clear path to dropping old topics.
With the next release, data isn't persisted, so it's unlikely that the dataset grows larger.
However, annoying _testing_experiment stuck around after a self-test is run.
However, annoying _testing_experiment stuck around after a self-test is run.
we clear _testing_experiment data now