Skip to content

Commit

Permalink
fix reboot on failed internet connection.
Browse files Browse the repository at this point in the history
  • Loading branch information
elschnorro77 committed Aug 26, 2024
1 parent 48e0f8e commit 825fa06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions read_and_upload_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def manage_transfer_to_ts(ts_channels, ts_fields, server_url, offline, debug, ts
except Exception as ex:
logger.exception("Exception during manage_transfer_to_ts")

def measure(q, offline, debug, ts_channels, ts_server_url, filtered_temperature, ds18b20Sensors, bme680Sensors, bme680Inits, dhtSensors, aht10Sensors, sht31Sensors, sht25Sensors, hdc1008Sensors, bh1750Sensors, tcSensors, bme280Sensors, pcf8591Sensors, ee895Sensors, gpsSensors, weightSensors, hxInits, connectionErrors, measurementIsRunning):
def measure(q, offline, debug, ts_channels, ts_server_url, filtered_temperature, ds18b20Sensors, bme680Sensors, bme680Inits, dhtSensors, aht10Sensors, sht31Sensors, sht25Sensors, hdc1008Sensors, bh1750Sensors, tcSensors, bme280Sensors, pcf8591Sensors, ee895Sensors, gpsSensors, weightSensors, hxInits, connectionErrors, measurementIsRunning, settings):
measurementIsRunning.value = 1 # set flag
ts_fields = {}
try:
Expand Down Expand Up @@ -301,7 +301,7 @@ def start_measurement(measurement_stop):

if startNewMeasurement:
q = Queue()
p = Process(target=measure, args=(q, offline, debug, ts_channels, ts_server_url, filtered_temperature, ds18b20Sensors, bme680Sensors, bme680Inits, dhtSensors, aht10Sensors, sht31Sensors, sht25Sensors, hdc1008Sensors, bh1750Sensors, tcSensors, bme280Sensors, pcf8591Sensors, ee895Sensors, gpsSensors, weightSensors, hxInits, connectionErrors, measurementIsRunning))
p = Process(target=measure, args=(q, offline, debug, ts_channels, ts_server_url, filtered_temperature, ds18b20Sensors, bme680Sensors, bme680Inits, dhtSensors, aht10Sensors, sht31Sensors, sht25Sensors, hdc1008Sensors, bh1750Sensors, tcSensors, bme280Sensors, pcf8591Sensors, ee895Sensors, gpsSensors, weightSensors, hxInits, connectionErrors, measurementIsRunning, settings))
p.start()

# determine timeout value for Process.join()
Expand Down

0 comments on commit 825fa06

Please sign in to comment.