Closed isZumpo closed 1 week ago
This update integrates a bird image caching mechanism into various components of the system. The core additions involve modifying the Processor
and MqttAction
components to utilize the new BirdImageCache
. Functions and initializations across components have been updated to accommodate this cache, ensuring that bird images are efficiently fetched and displayed, enhancing the overall functionality.
File(s) | Description |
---|---|
internal/analysis/processor/actions.go |
Added imports and fields related to BirdImageCache ; modified Execute method to fetch and wrap bird image with note. |
internal/analysis/processor/processor.go |
Added BirdImageCache field to Processor struct; updated New function signature; included global BirdImageCache variable. |
internal/analysis/processor/workers.go |
Updated getDefaultActions method to include BirdImageCache . |
internal/analysis/realtime.go |
Added import and initialization of birdImageCache , and passed it to processor.New and httpcontroller.New . Added initBirdImageCache function. |
internal/httpcontroller/init.go |
Updated import statements and New function signature to include birdImageCache parameter; removed initBirdImageCache function. |
views/fragments/birdsTableHTML.html |
Removed a TODO comment about adding credits for the bird thumbnail. |
In code we weave a cache so grand,
With bird images at our hand.
From HTTP to MQTT,
Feathered friends for all to see.
Coding paths now intertwined,
In a nest of logic finely lined. 🐇✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Based on request #218
The new mqtt message which contains the bird image information should be backwards compatible with the old one. Since the old message is simply extended to also contain the filed BirdImage. See example below: