Ask Your Question

Revision history [back]

Right now your queue_size is 10 meaning you will buffer 10 messages and no more while the sleep wait for the wifi connection is going on. You could increase that size greatly to handle so many seconds of outage.

Or you could buffer the incoming messages yourself (in a data structure you create in the python node) which would give you the ability to take more other actions in the case of long outages- e.g. delete every other old message, only keep interesting ones, generate a warning to the user through another channel, or buffer without limit until you get a MemoryError exception and perhaps can recover or crash from it.

Right now your queue_size is 10 meaning you will buffer 10 messages and no more while the sleep wait for the wifi connection is going on. You could increase that size greatly to handle so many seconds of outage.

Or you could buffer the incoming messages yourself (in a data structure you create in the python node) which would give you the ability to take more other actions in the case of long outages- e.g. delete every other old message, only keep interesting ones, generate a warning to the user through another channel, or buffer without limit until you get a MemoryError exception and perhaps can recover or crash from it.