modified: srcdev/api.py
modified: srcdev/moj_licznik.py modified: srcdev/run.py
This commit is contained in:
Binary file not shown.
@@ -210,7 +210,8 @@ def charts():
|
||||
query = query.where(MainChartTable.mp == mp)
|
||||
|
||||
if meter_type_url:
|
||||
query = query.where(MainChartTable.meter_type_url == meter_type_url)
|
||||
meter_type = urllib.parse.unquote(meter_type_url)
|
||||
query = query.where(MainChartTable.meter_type == meter_type)
|
||||
|
||||
if zone:
|
||||
query = query.where(MainChartTable.zone == zone)
|
||||
|
||||
@@ -357,7 +357,7 @@ class MojLicznik:
|
||||
|
||||
def save_main_charts(self, mp, vals, m_type):
|
||||
for val in vals:
|
||||
#try:
|
||||
try:
|
||||
logger.debug(f"save_main_charts: mp: {mp}, val: {val}, meter_type: {m_type}")
|
||||
z = val["zones"]
|
||||
if z[0]:
|
||||
@@ -409,8 +409,8 @@ class MojLicznik:
|
||||
cplt=val["cplt"]
|
||||
)
|
||||
|
||||
#except:
|
||||
# pass
|
||||
except Exception as e:
|
||||
logging.error(f"Wystąpił błąd: {str(e)}")
|
||||
|
||||
return None
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ def periodic_task():
|
||||
startup_task_completed.wait()
|
||||
while True:
|
||||
try:
|
||||
waiting_seconds = 600
|
||||
waiting_seconds = 1200
|
||||
logger.info(f"Oczekiwanie...")
|
||||
logger.debug(f"Czekam {waiting_seconds} sekund.")
|
||||
time.sleep(waiting_seconds)
|
||||
|
||||
Reference in New Issue
Block a user