|
12 | 12 | import numpy as np
|
13 | 13 | from delphi_utils import (
|
14 | 14 | create_export_csv,
|
15 |
| - S3ArchiveDiffer, |
16 | 15 | Smoother,
|
17 | 16 | GeoMapper,
|
18 | 17 | get_structured_logger,
|
@@ -89,18 +88,6 @@ def run_module(params: Dict[str, Any]):
|
89 | 88 | __name__, filename=params["common"].get("log_filename"),
|
90 | 89 | log_exceptions=params["common"].get("log_exceptions", True))
|
91 | 90 |
|
92 |
| - if "archive" in params: |
93 |
| - arch_diff = S3ArchiveDiffer( |
94 |
| - params["archive"]["cache_dir"], |
95 |
| - export_dir, |
96 |
| - params["archive"]["bucket_name"], |
97 |
| - "jhu", |
98 |
| - params["archive"]["aws_credentials"], |
99 |
| - ) |
100 |
| - arch_diff.update_cache() |
101 |
| - else: |
102 |
| - arch_diff = None |
103 |
| - |
104 | 91 | gmpr = GeoMapper()
|
105 | 92 | dfs = {metric: pull_jhu_data(base_url, metric, gmpr) for metric in METRICS}
|
106 | 93 | for metric, geo_res, sensor, smoother in product(
|
@@ -144,25 +131,6 @@ def run_module(params: Dict[str, Any]):
|
144 | 131 | oldest_final_export_date = min(
|
145 | 132 | oldest_final_export_date, max(exported_csv_dates))
|
146 | 133 |
|
147 |
| - if arch_diff is not None: |
148 |
| - # Diff exports, and make incremental versions |
149 |
| - _, common_diffs, new_files = arch_diff.diff_exports() |
150 |
| - |
151 |
| - # Archive changed and new files only |
152 |
| - to_archive = [f for f, diff in common_diffs.items() if diff is not None] |
153 |
| - to_archive += new_files |
154 |
| - _, fails = arch_diff.archive_exports(to_archive) |
155 |
| - |
156 |
| - # Filter existing exports to exclude those that failed to archive |
157 |
| - succ_common_diffs = { |
158 |
| - f: diff for f, diff in common_diffs.items() if f not in fails |
159 |
| - } |
160 |
| - arch_diff.filter_exports(succ_common_diffs) |
161 |
| - |
162 |
| - # Report failures: someone should probably look at them |
163 |
| - for exported_file in fails: |
164 |
| - print(f"Failed to archive '{exported_file}'") |
165 |
| - |
166 | 134 | elapsed_time_in_seconds = round(time.time() - start_time, 2)
|
167 | 135 | max_lag_in_days = None
|
168 | 136 | formatted_oldest_final_export_date = None
|
|
0 commit comments