|
@@ -64,8 +64,10 @@ class DataPlatformService(Service):
|
|
|
if arrow.get(latest_time, TIME_FMT).shift(minutes=15) < arrow.get(self._now_time, TIME_FMT):
|
|
|
logger.info(f'delayed data - {object_id}: ({latest_time}, {latest_data})')
|
|
|
value = round_half_up(latest_data, 2)
|
|
|
- except KeyError and IndexError and TypeError:
|
|
|
+ except KeyError and IndexError:
|
|
|
value = np.NAN
|
|
|
+ except TypeError:
|
|
|
+ value = -1.0
|
|
|
|
|
|
return value
|
|
|
|
|
@@ -99,8 +101,10 @@ class DataPlatformService(Service):
|
|
|
if arrow.get(latest_time, TIME_FMT).shift(minutes=15) < arrow.get(end_time, TIME_FMT):
|
|
|
logger.info(f'delayed data - {object_id}: ({latest_time}, {latest_data})')
|
|
|
value = round_half_up(latest_data, 2)
|
|
|
- except KeyError and IndexError and TypeError:
|
|
|
+ except KeyError and IndexError:
|
|
|
value = np.NAN
|
|
|
+ except TypeError:
|
|
|
+ value = -1.0
|
|
|
|
|
|
return value
|
|
|
|