rewriting of event handling class, StreamSources 1. counting error fixed (ok_counts and failure_counts)
1. counting error fixed (ok_counts and failure_counts)
@d214df142b7273a34c35b0274550f4824634d320
--- postprocess_draft.py
+++ postprocess_draft.py
... | ... | @@ -104,7 +104,7 @@ |
104 | 104 |
print(self.sources[source]["status_counts"][-seek_n_recent_memory:]) |
105 | 105 |
self.sources[source]['failure_counts'] = (seek_n_recent_memory |
106 | 106 |
- sum(self.sources[source]["status_counts"][-seek_n_recent_memory:])) |
107 |
- self.sources[source]['ok_counts'] = seek_n_recent_memory - self.sources[source]['ok_counts'] |
|
107 |
+ self.sources[source]['ok_counts'] = sum(self.sources[source]["status_counts"][-seek_n_recent_memory:]) |
|
108 | 108 |
flag_send_event = True |
109 | 109 |
|
110 | 110 |
# mode switching condition check |
... | ... | @@ -121,7 +121,7 @@ |
121 | 121 |
print(self.sources[source]["status_counts"][-seek_n_recent_memory:]) |
122 | 122 |
self.sources[source]['failure_counts'] = (seek_n_recent_memory |
123 | 123 |
- sum(self.sources[source]["status_counts"][-seek_n_recent_memory:])) |
124 |
- self.sources[source]['ok_counts'] = seek_n_recent_memory - self.sources[source]['ok_counts'] |
|
124 |
+ self.sources[source]['ok_counts'] = sum(self.sources[source]["status_counts"][-seek_n_recent_memory:]) |
|
125 | 125 |
# print(self.sources[source]['failure_counts']) |
126 | 126 |
|
127 | 127 |
# mode switching condition check |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?