rewriting of event handling class, StreamSources 1. counting error fixed (ok_counts and failure_counts)
1. counting error fixed (ok_counts and failure_counts)
@3a7f3b956f24be254507bf507c52a74fcaeba219
--- postprocess_draft.py
+++ postprocess_draft.py
... | ... | @@ -100,8 +100,6 @@ |
100 | 100 |
|
101 | 101 |
if self.sources[source]["force_send_mode"]: |
102 | 102 |
seek_n_recent_memory = min(len(self.sources[source]["status_counts"]), self.failure_mode_check_past_n) |
103 |
- print(seek_n_recent_memory) |
|
104 |
- print(self.sources[source]["status_counts"][-seek_n_recent_memory:]) |
|
105 | 103 |
self.sources[source]['failure_counts'] = (seek_n_recent_memory |
106 | 104 |
- sum(self.sources[source]["status_counts"][-seek_n_recent_memory:])) |
107 | 105 |
self.sources[source]['ok_counts'] = sum(self.sources[source]["status_counts"][-seek_n_recent_memory:]) |
... | ... | @@ -116,9 +114,6 @@ |
116 | 114 |
|
117 | 115 |
else: |
118 | 116 |
seek_n_recent_memory = min(len(self.sources[source]["status_counts"]), self.normal_mode_check_past_n) |
119 |
- print(seek_n_recent_memory) |
|
120 |
- # mem_len = len(self.sources[source]["status_counts"]) |
|
121 |
- print(self.sources[source]["status_counts"][-seek_n_recent_memory:]) |
|
122 | 117 |
self.sources[source]['failure_counts'] = (seek_n_recent_memory |
123 | 118 |
- sum(self.sources[source]["status_counts"][-seek_n_recent_memory:])) |
124 | 119 |
self.sources[source]['ok_counts'] = sum(self.sources[source]["status_counts"][-seek_n_recent_memory:]) |
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?