adafruit / Adafruit_CircuitPython_AdafruitIO

Adafruit IO for CircuitPython
http://io.adafruit.com
MIT License
49 stars 33 forks source link

Publish_Multiple default 3 second timeout #103

Closed DJDevon3 closed 1 month ago

DJDevon3 commented 1 year ago

This is a documentation clarification request.

I ran into an issue where I thought using publish_multiple was for publishing multiple feeds at the same time. There is a 3 second delay between publishing each item (in a list you specify) by default which isn't explicitly documented. I thought if no timeout was specified it would be 0. This is an assumption issue on my part yes but something worth making more clear in documentation.

this will publish both feeds simultaneously with the same timestamp

io.publish("temperature", temperature_value)
io.publish("humidity", humidity_value)

this will publish both feeds 3 seconds apart

io.publish_multiple([("temperature", temperature_value), ("humidity", humidity_value)])

my expectation was publish_multiple would publish both simultaneously and individual publishes would be buffered. It works completely the opposite of how I expected. Again this is an assumption issue on my part but something worth putting down on paper.

tyeth commented 1 month ago

Appears to now be documented, closing this issue