howler-api 3.0.0.dev368__py3-none-any.whl → 3.0.0.dev370__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of howler-api might be problematic. Click here for more details.
- howler/datastore/collection.py +1 -1
- howler/external/reindex_data.py +11 -15
- {howler_api-3.0.0.dev368.dist-info → howler_api-3.0.0.dev370.dist-info}/METADATA +1 -1
- {howler_api-3.0.0.dev368.dist-info → howler_api-3.0.0.dev370.dist-info}/RECORD +6 -6
- {howler_api-3.0.0.dev368.dist-info → howler_api-3.0.0.dev370.dist-info}/WHEEL +0 -0
- {howler_api-3.0.0.dev368.dist-info → howler_api-3.0.0.dev370.dist-info}/entry_points.txt +0 -0
howler/datastore/collection.py
CHANGED
|
@@ -430,7 +430,7 @@ class ESCollection(Generic[ModelType]):
|
|
|
430
430
|
wait_for_completion=True,
|
|
431
431
|
timeout="10s",
|
|
432
432
|
)
|
|
433
|
-
except elasticsearch.exceptions.TransportError as e:
|
|
433
|
+
except (elasticsearch.exceptions.TransportError, elasticsearch.exceptions.ApiError) as e:
|
|
434
434
|
err_code, msg, _ = e.args
|
|
435
435
|
if (err_code == 500 or err_code == "500") and msg in [
|
|
436
436
|
"timeout_exception",
|
howler/external/reindex_data.py
CHANGED
|
@@ -9,10 +9,6 @@ DELAY = 5
|
|
|
9
9
|
if __name__ == "__main__":
|
|
10
10
|
print("This script will allow you to reindex all indexes in elasticsearch.")
|
|
11
11
|
print("For obvious reasons, be EXTREMELY CAREFUL running this code.")
|
|
12
|
-
|
|
13
|
-
for i in range(DELAY):
|
|
14
|
-
print(f"Continuing in {str(DELAY - i)}...", end="\r")
|
|
15
|
-
time.sleep(1)
|
|
16
12
|
print()
|
|
17
13
|
answer = input("Are you sure you want to reindex data for an index in this cluster? [yes/NO]\n")
|
|
18
14
|
|
|
@@ -28,15 +24,15 @@ if __name__ == "__main__":
|
|
|
28
24
|
|
|
29
25
|
ds = loader.datastore(archive_access=False)
|
|
30
26
|
|
|
31
|
-
indexes: dict[str, tuple[
|
|
32
|
-
"analytic": (ds.analytic
|
|
33
|
-
"hit": (ds.hit
|
|
34
|
-
"view": (ds.view
|
|
35
|
-
"template": (ds.template
|
|
36
|
-
"overview": (ds.overview
|
|
37
|
-
"action": (ds.action
|
|
38
|
-
"user": (ds.user
|
|
39
|
-
"dossier": (ds.dossier
|
|
27
|
+
indexes: dict[str, tuple[ESCollection, Callable]] = {
|
|
28
|
+
"analytic": (ds.analytic, ds.analytic.reindex),
|
|
29
|
+
"hit": (ds.hit, ds.hit.reindex),
|
|
30
|
+
"view": (ds.view, ds.view.reindex),
|
|
31
|
+
"template": (ds.template, ds.template.reindex),
|
|
32
|
+
"overview": (ds.overview, ds.overview.reindex),
|
|
33
|
+
"action": (ds.action, ds.action.reindex),
|
|
34
|
+
"user": (ds.user, ds.user.reindex),
|
|
35
|
+
"dossier": (ds.dossier, ds.dossier.reindex),
|
|
40
36
|
}
|
|
41
37
|
|
|
42
38
|
print("Which index will you reindex?")
|
|
@@ -47,10 +43,10 @@ if __name__ == "__main__":
|
|
|
47
43
|
sys.exit(1)
|
|
48
44
|
|
|
49
45
|
print("Index schema:")
|
|
50
|
-
print(json.dumps(
|
|
46
|
+
print(json.dumps(indexes[index_answer][0]._get_index_mappings(), indent=2))
|
|
51
47
|
|
|
52
48
|
print("\nYou will be reindexing the following indexes:")
|
|
53
|
-
print("\n".join(indexes[index_answer][0]))
|
|
49
|
+
print("\n".join(indexes[index_answer][0].index_list_full))
|
|
54
50
|
|
|
55
51
|
answer = input(("\nAre you sure you want to reindex these indexes? [yes/NO]\n"))
|
|
56
52
|
print()
|
|
@@ -53,7 +53,7 @@ howler/cronjobs/view_cleanup.py,sha256=ULWLR1uFcRemRgkEDrMqmBamHiE0dgDvu49VK0qDk
|
|
|
53
53
|
howler/datastore/README.md,sha256=ekWl1YJSrHlZpU5PgBkPEzPWjdbTdav6Rd2P0ccIesw,4758
|
|
54
54
|
howler/datastore/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
55
55
|
howler/datastore/bulk.py,sha256=VfolZfiaBD4ZTK3j6IVVVq4GMjVXb5elrsGwwM_nONE,2829
|
|
56
|
-
howler/datastore/collection.py,sha256=
|
|
56
|
+
howler/datastore/collection.py,sha256=joi4-lUMWGH1DBO3ag36GriSI7J2n-UpIfb1-KaBdTU,91191
|
|
57
57
|
howler/datastore/constants.py,sha256=x7ODomtOQmDjmXoAxly4onPAnUkq4BLZ1TBg-UgpU1g,2415
|
|
58
58
|
howler/datastore/exceptions.py,sha256=yZvQXRI4mR50ltGFHbdZAD4TIbhdKJku6LLTPQ0JZRk,955
|
|
59
59
|
howler/datastore/howler_store.py,sha256=kW7FKM-tILcfTmrjSB1yZm-ZnumPS_tiQEZUDaQoDkg,2915
|
|
@@ -70,7 +70,7 @@ howler/external/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
70
70
|
howler/external/generate_mitre.py,sha256=B4ALOP9OdAuq45u0UahprtFkG-B0SuMw-PwuUdZFFfM,2638
|
|
71
71
|
howler/external/generate_sigma_rules.py,sha256=QkdgEtOYqazRqvc0sfkP_sZmooDbmog6BUfgTJ2zhPY,831
|
|
72
72
|
howler/external/generate_tlds.py,sha256=S_J-x3QUaRjpZKOcBrnL8w7-FfTNKLOIrvW3qJDcj4Y,1386
|
|
73
|
-
howler/external/reindex_data.py,sha256=
|
|
73
|
+
howler/external/reindex_data.py,sha256=NyVZ0fXnsVGeuI3DZF5Ufq8Wqp9giimyRzdJOT8Dyh0,2016
|
|
74
74
|
howler/external/wipe_databases.py,sha256=CO_mUdezp24h6xz6Di_K5-Mid61d9EVcBO4ap5qnVao,1610
|
|
75
75
|
howler/gunicorn_config.py,sha256=0X7DPFcVDu3qAgMbNsdYGqCuvQGn5ZNx_eapOMyuXuI,750
|
|
76
76
|
howler/healthz.py,sha256=nvb8MBBERYIkA_UxxLIyNEQazYOnPCcm0sH0Jm5nF0k,769
|
|
@@ -192,7 +192,7 @@ howler/utils/path.py,sha256=DfOU4i4zSs4wchHoE8iE7aWVLkTxiC_JRGepF2hBYBk,690
|
|
|
192
192
|
howler/utils/socket_utils.py,sha256=nz1SklC9xBHUSfHyTJjpq3mbozX1GDf01WzdGxfaUII,2212
|
|
193
193
|
howler/utils/str_utils.py,sha256=HE8Hqh2HlOLaj16w0H9zKOyDJLp-f1LQ50y_WeGZaEk,8389
|
|
194
194
|
howler/utils/uid.py,sha256=p9dsqyvZ-lpiAuzZWCPCeEM99kdk0Ly9czf04HNdSuw,1341
|
|
195
|
-
howler_api-3.0.0.
|
|
196
|
-
howler_api-3.0.0.
|
|
197
|
-
howler_api-3.0.0.
|
|
198
|
-
howler_api-3.0.0.
|
|
195
|
+
howler_api-3.0.0.dev370.dist-info/METADATA,sha256=5FcQIDtcBMrBp0M1ja4J3Lg-2vgO3Aty3eheyvArcrw,2804
|
|
196
|
+
howler_api-3.0.0.dev370.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
197
|
+
howler_api-3.0.0.dev370.dist-info/entry_points.txt,sha256=Lu9SBGvwe0wczJHmc-RudC24lmQk7tv3ZBXon9RIihg,259
|
|
198
|
+
howler_api-3.0.0.dev370.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|