|
@@ -66,13 +66,16 @@ class MchDataCenter(object):
|
|
|
key = str(item[0], encoding="utf-8")
|
|
|
items = re.split(r'-', key)
|
|
|
|
|
|
- fdel = True
|
|
|
+ flag_del = True
|
|
|
if len(items) == 5:
|
|
|
(mchid, quality, card_type, amount, time) = items
|
|
|
time = int(time)
|
|
|
if latest_time <= time:
|
|
|
- fdel = False
|
|
|
- if fdel:
|
|
|
+ flag_del = False
|
|
|
+ else:
|
|
|
+ print('delete one error key:', key)
|
|
|
+
|
|
|
+ if flag_del:
|
|
|
redis.hdel(name, key)
|
|
|
pass
|
|
|
|
|
@@ -302,7 +305,7 @@ class MchDataCenter(object):
|
|
|
return filer_text, paths
|
|
|
|
|
|
def _draw_plot(self, ax, x, day_stamp, start_pos, end_pos, data, interval=300, path=''):
|
|
|
- # 'commit-succ': 0, 'notify-succ': 1, 'notify-fail': 2
|
|
|
+ # 'commit': 0, 'succ': 1, 'fail': 2
|
|
|
logging.getLogger('app').debug("path=%s", path)
|
|
|
|
|
|
all = data[1] + data[2]
|
|
@@ -330,7 +333,7 @@ class MchDataCenter(object):
|
|
|
all = all[pos]
|
|
|
|
|
|
succ_count = int(np.sum(ySucc))
|
|
|
- all_count = int(np.sum(all))
|
|
|
+ all_count = int(np.sum(all))
|
|
|
|
|
|
if all_count < 1:
|
|
|
return False
|