Closed JeetShetty closed 7 years ago
Until now I wasn't really thinking about how the camera poller has access to the queue but doesn't use it. Seems bad? Should I try to find a way to refactor the camera poller code?
Oh yeah, it's a little messy, but I can't think of a way to fix it without adding more complexity. The way that first comes to mind is to create a deeper class hierarchy like
class _SensorPollWorkerBase(object):
# Base for all poll workers
class RecordProducingPollWorkerBase(_SensorPollWorkerBase):
# Base class for workers that produce recorsd
class TemperatureWorker(RecordProducingPollWorkerBase):
...
But I feel like that's more confusing than what we have now.
Any ideas for different approaches? I think as-is it's fine, but maybe there's a clean way to fix it.
Any ideas for different approaches? I think as-is it's fine, but maybe there's a clean way to fix it.
Yeah nothing good comes to mind right now, but I'll keep thinking about it. In the most recent commit I changed the camera_poller_factory
instantiation to use None
instead of the actual record queue, but I'm not sure if this is a good idea.
Until now I wasn't really thinking about how the camera poller has access to the queue but doesn't use it. Seems bad? Should I try to find a way to refactor the camera poller code?
118