cose
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
"logFile": "/home/briq/logs/nasoscopio-grande.log",
|
"logFile": "/home/briq/logs/nasoscopio-grande.log",
|
||||||
"logFormat": "%(asctime)s|%(levelname)-7s|%(funcName)-10s|%(lineno)-3d: %(message)-50s",
|
"logFormat": "%(asctime)s|%(levelname)-7s|%(funcName)-10s|%(lineno)-3d: %(message)-50s",
|
||||||
"logTimeFormat": "%m-%d %H:%M:%S",
|
"logTimeFormat": "%m-%d %H:%M:%S",
|
||||||
"URL": "http://localhost:8880",
|
"URL": "http://localhost:8080",
|
||||||
"samplePeriod": 10,
|
"samplePeriod": 10,
|
||||||
"loopPeriod": 0.5,
|
"loopPeriod": 0.5,
|
||||||
"recordTime": 3600,
|
"recordTime": 3600,
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"logFile": "/home/briq/logs/nasoscopio-piccola.log",
|
"logFile": "/home/briq/logs/nasoscopio-piccola.log",
|
||||||
"logFormat": "%(asctime)s|%(levelname)-7s|%(funcName)-10s|%(lineno)-3d: %(message)-50s",
|
"logFormat": "%(asctime)s|%(levelname)-7s|%(funcName)-10s|%(lineno)-3d: %(message)-50s",
|
||||||
"logTimeFormat": "%m-%d %H:%M:%S",
|
"logTimeFormat": "%m-%d %H:%M:%S",
|
||||||
"URL": "http://localhost:8881",
|
"URL": "http://localhost:8081",
|
||||||
"samplePeriod": 10,
|
"samplePeriod": 10,
|
||||||
"loopPeriod": 0.5,
|
"loopPeriod": 0.5,
|
||||||
"recordTime": 3600,
|
"recordTime": 3600,
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ if __name__ == '__main__':
|
|||||||
for idx,rec in enumerate(tempSamples[ax][reg]):
|
for idx,rec in enumerate(tempSamples[ax][reg]):
|
||||||
tempSamples[ax][reg][idx]=(tempSamples[ax][reg][idx][templates.SAM_TS],
|
tempSamples[ax][reg][idx]=(tempSamples[ax][reg][idx][templates.SAM_TS],
|
||||||
tempSamples[ax][reg][idx][templates.SAM_VAL])
|
tempSamples[ax][reg][idx][templates.SAM_VAL])
|
||||||
if not settings["sendMqtt"]:
|
if settings["sendMqtt"]:
|
||||||
if tempSamples[ax][reg][idx][templates.SAM_TS] > settings["recordTime"]:
|
if tempSamples[ax][reg][idx][templates.SAM_TS] > settings["recordTime"]:
|
||||||
samples[ax][reg] = samples[ax][reg][-(len(samples)-len(tempSamples)):]
|
samples[ax][reg] = samples[ax][reg][-(len(samples)-len(tempSamples)):]
|
||||||
if bufferFull < 1:
|
if bufferFull < 1:
|
||||||
@@ -356,7 +356,7 @@ if __name__ == '__main__':
|
|||||||
samples[ax][reg]+=tempSamples[ax][reg]
|
samples[ax][reg]+=tempSamples[ax][reg]
|
||||||
else:
|
else:
|
||||||
sendSamples(tempSamples)
|
sendSamples(tempSamples)
|
||||||
else:
|
elif settings['sendInflux']:
|
||||||
influxMeas = list()
|
influxMeas = list()
|
||||||
for idx,record in enumerate(tempSamples[ax][reg]):
|
for idx,record in enumerate(tempSamples[ax][reg]):
|
||||||
ts = tempSamples[ax][reg][idx][templates.SAM_TS]+firstTS*1000000
|
ts = tempSamples[ax][reg][idx][templates.SAM_TS]+firstTS*1000000
|
||||||
@@ -376,6 +376,8 @@ if __name__ == '__main__':
|
|||||||
LOGGER.error(f'Impossibile scrivere nel database: {e}')
|
LOGGER.error(f'Impossibile scrivere nel database: {e}')
|
||||||
LOGGER.error(f'TS da controllo: {datetime.fromtimestamp(ts).strftime("%d/%m/%y_%H:%M:%S,%f")}')
|
LOGGER.error(f'TS da controllo: {datetime.fromtimestamp(ts).strftime("%d/%m/%y_%H:%M:%S,%f")}')
|
||||||
stat='STOP'
|
stat='STOP'
|
||||||
|
else:
|
||||||
|
pass
|
||||||
pass
|
pass
|
||||||
pass
|
pass
|
||||||
pass
|
pass
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ RestartSec=15s
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=briq
|
User=briq
|
||||||
Group=briq
|
Group=briq
|
||||||
WorkingDirectory=/root/NasoScopio/NasoScope/
|
WorkingDirectory=/home/briq/NasoScopio/
|
||||||
ExecStart=/usr/bin/python3 nasomain.py config-grande.json
|
ExecStart=/usr/bin/python3 nasomain.py config-grande.json
|
||||||
PIDFile=/run/nasoscopio-grande.pid
|
PIDFile=/run/nasoscopio-grande.pid
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ RestartSec=15s
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=briq
|
User=briq
|
||||||
Group=briq
|
Group=briq
|
||||||
WorkingDirectory=/home/briq/Nasoscopio/
|
WorkingDirectory=/home/briq/NasoScopio/
|
||||||
ExecStart=/usr/bin/python3 nasomain.py config-piccola.json
|
ExecStart=/usr/bin/python3 nasomain.py config-piccola.json
|
||||||
PIDFile=/run/nasoscopio-piccola.pid
|
PIDFile=/run/nasoscopio-piccola.pid
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
Reference in New Issue
Block a user