nedo-vision-worker 1.3.3__py3-none-any.whl → 1.3.5__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.
- nedo_vision_worker/__init__.py +1 -1
- nedo_vision_worker/worker/DataSenderWorker.py +6 -4
- nedo_vision_worker/worker/PPEDetectionManager.py +5 -4
- nedo_vision_worker/worker/RestrictedAreaManager.py +5 -4
- {nedo_vision_worker-1.3.3.dist-info → nedo_vision_worker-1.3.5.dist-info}/METADATA +1 -1
- {nedo_vision_worker-1.3.3.dist-info → nedo_vision_worker-1.3.5.dist-info}/RECORD +9 -9
- {nedo_vision_worker-1.3.3.dist-info → nedo_vision_worker-1.3.5.dist-info}/WHEEL +0 -0
- {nedo_vision_worker-1.3.3.dist-info → nedo_vision_worker-1.3.5.dist-info}/entry_points.txt +0 -0
- {nedo_vision_worker-1.3.3.dist-info → nedo_vision_worker-1.3.5.dist-info}/top_level.txt +0 -0
nedo_vision_worker/__init__.py
CHANGED
|
@@ -153,7 +153,7 @@ class DataSenderWorker:
|
|
|
153
153
|
def _calculate_sleep_interval(self, ppe_pending: int, violation_pending: int) -> float:
|
|
154
154
|
"""
|
|
155
155
|
Calculate optimal sleep interval based on pending data.
|
|
156
|
-
Conservative approach to prevent server overload.
|
|
156
|
+
Conservative approach to prevent server overload and storage rate limits.
|
|
157
157
|
|
|
158
158
|
Args:
|
|
159
159
|
ppe_pending: Number of pending PPE detections
|
|
@@ -169,11 +169,13 @@ class DataSenderWorker:
|
|
|
169
169
|
elif total_pending < 50:
|
|
170
170
|
return self.send_interval
|
|
171
171
|
elif total_pending < 200:
|
|
172
|
-
return
|
|
172
|
+
return 4.0
|
|
173
173
|
elif total_pending < 500:
|
|
174
|
-
return
|
|
174
|
+
return 3.0
|
|
175
|
+
elif total_pending < 1000:
|
|
176
|
+
return 2.5
|
|
175
177
|
else:
|
|
176
|
-
return
|
|
178
|
+
return 2.0
|
|
177
179
|
|
|
178
180
|
def _run_worker_source_updater(self):
|
|
179
181
|
"""Dedicated loop for updating worker sources at a different interval."""
|
|
@@ -54,6 +54,7 @@ class PPEDetectionManager:
|
|
|
54
54
|
def _calculate_fetch_size(self, pending_count: int) -> int:
|
|
55
55
|
"""
|
|
56
56
|
Dynamically calculates how many records to fetch based on pending count.
|
|
57
|
+
Reduced to prevent storage rate limits (each detection = 2 images = 2 dir checks).
|
|
57
58
|
|
|
58
59
|
Args:
|
|
59
60
|
pending_count (int): Number of pending detections
|
|
@@ -62,13 +63,13 @@ class PPEDetectionManager:
|
|
|
62
63
|
int: Number of records to fetch
|
|
63
64
|
"""
|
|
64
65
|
if pending_count <= 50:
|
|
65
|
-
return min(pending_count,
|
|
66
|
+
return min(pending_count, 5)
|
|
66
67
|
elif pending_count <= 200:
|
|
67
|
-
return min(pending_count,
|
|
68
|
+
return min(pending_count, 10)
|
|
68
69
|
elif pending_count <= 1000:
|
|
69
|
-
return min(pending_count,
|
|
70
|
+
return min(pending_count, 15)
|
|
70
71
|
else:
|
|
71
|
-
return min(pending_count,
|
|
72
|
+
return min(pending_count, 20)
|
|
72
73
|
|
|
73
74
|
def _calculate_batch_by_size(self, all_detections: list, max_size_mb: int = 40) -> list:
|
|
74
75
|
"""
|
|
@@ -54,6 +54,7 @@ class RestrictedAreaManager:
|
|
|
54
54
|
def _calculate_fetch_size(self, pending_count: int) -> int:
|
|
55
55
|
"""
|
|
56
56
|
Dynamically calculates how many records to fetch based on pending count.
|
|
57
|
+
Reduced to prevent storage rate limits (each violation = 2 images = 2 dir checks).
|
|
57
58
|
|
|
58
59
|
Args:
|
|
59
60
|
pending_count (int): Number of pending violations
|
|
@@ -62,13 +63,13 @@ class RestrictedAreaManager:
|
|
|
62
63
|
int: Number of records to fetch
|
|
63
64
|
"""
|
|
64
65
|
if pending_count <= 50:
|
|
65
|
-
return min(pending_count,
|
|
66
|
+
return min(pending_count, 5)
|
|
66
67
|
elif pending_count <= 200:
|
|
67
|
-
return min(pending_count,
|
|
68
|
+
return min(pending_count, 10)
|
|
68
69
|
elif pending_count <= 1000:
|
|
69
|
-
return min(pending_count,
|
|
70
|
+
return min(pending_count, 15)
|
|
70
71
|
else:
|
|
71
|
-
return min(pending_count,
|
|
72
|
+
return min(pending_count, 20)
|
|
72
73
|
|
|
73
74
|
def _calculate_batch_by_size(self, all_violations: list, max_size_mb: int = 40) -> list:
|
|
74
75
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nedo-vision-worker
|
|
3
|
-
Version: 1.3.
|
|
3
|
+
Version: 1.3.5
|
|
4
4
|
Summary: Nedo Vision Worker Service Library for AI Vision Processing
|
|
5
5
|
Author-email: Willy Achmat Fauzi <willy.achmat@gmail.com>
|
|
6
6
|
Maintainer-email: Willy Achmat Fauzi <willy.achmat@gmail.com>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
nedo_vision_worker/__init__.py,sha256=
|
|
1
|
+
nedo_vision_worker/__init__.py,sha256=5XGhmiZwTkqHlXOZd-dVjqCEOx21tOtxk24cH0N_kqM,203
|
|
2
2
|
nedo_vision_worker/cli.py,sha256=ddWspJmSgVkcUYvRdkvTtMNuMTDvNCqLLuMVU9KE3Ik,7457
|
|
3
3
|
nedo_vision_worker/doctor.py,sha256=wNkpe8gLVd76Y_ViyK2h1ZFdqeSl37MnzZN5frWKu30,48410
|
|
4
4
|
nedo_vision_worker/worker_service.py,sha256=9zz8hKwDwqwpfS0KPQfftGJtRci0uj_wiwcr_TGf-E0,11039
|
|
@@ -80,22 +80,22 @@ nedo_vision_worker/util/SystemMonitor.py,sha256=2kkqj9mOlywAS2fHdN1TaIXSXvCApcIH
|
|
|
80
80
|
nedo_vision_worker/util/VideoProbeUtil.py,sha256=cF-vJ7hIDlXfEJby2a0s9tqwkPGVz_6B3Vv4D5pMmIw,12876
|
|
81
81
|
nedo_vision_worker/util/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
82
82
|
nedo_vision_worker/worker/CoreActionWorker.py,sha256=lb7zPY3yui6I3F4rX4Ii7JwpWZahLEO72rh3iWOgFmg,5441
|
|
83
|
-
nedo_vision_worker/worker/DataSenderWorker.py,sha256=
|
|
83
|
+
nedo_vision_worker/worker/DataSenderWorker.py,sha256=57bhNhpbherg_gCuUNnKt_1JwSQk1ukbx8mFWNsmrJ4,9171
|
|
84
84
|
nedo_vision_worker/worker/DataSyncWorker.py,sha256=LmDPt2J1frmXwuR46L6b0MjlFOHfgG-4_0MGQa78zF4,6288
|
|
85
85
|
nedo_vision_worker/worker/DatasetFrameSender.py,sha256=1SFYj8LJFNi-anBTapsbq8U_NGMM7mnoMKg9NeFAHys,8087
|
|
86
86
|
nedo_vision_worker/worker/DatasetFrameWorker.py,sha256=Hh_wZuMjwovxsEKFqXSuTRin9eYRBZCbcFKm3CKLMbE,19335
|
|
87
|
-
nedo_vision_worker/worker/PPEDetectionManager.py,sha256=
|
|
87
|
+
nedo_vision_worker/worker/PPEDetectionManager.py,sha256=lb46NfhrZ-g_pxhurZl2uozPnWneZzptYOaIdzoFQxM,6775
|
|
88
88
|
nedo_vision_worker/worker/PipelineActionWorker.py,sha256=xgvryjKtEsMj4BKqWzDIaK_lFny-DfMCj5Y2DxHnWww,5651
|
|
89
89
|
nedo_vision_worker/worker/PipelineImageWorker.py,sha256=J8VBUG0cwcH3qOJp2zTl30B-XhmPFyvJLjxitKJYq0E,5642
|
|
90
90
|
nedo_vision_worker/worker/PipelinePreviewWorker.py,sha256=owFiBbktcOZkdImQeykZSeBIR2-mpt6HNkmYIkLRKzE,6397
|
|
91
91
|
nedo_vision_worker/worker/RabbitMQListener.py,sha256=9gR49MDplgpyb-D5HOH0K77-DJQFvhS2E7biL92SjSU,6950
|
|
92
|
-
nedo_vision_worker/worker/RestrictedAreaManager.py,sha256=
|
|
92
|
+
nedo_vision_worker/worker/RestrictedAreaManager.py,sha256=LAIrOhzGlR0gQNuTJZx6zvUmcg5WwGKehthONCMjbCQ,6639
|
|
93
93
|
nedo_vision_worker/worker/SystemUsageManager.py,sha256=mkh4sT-HkIEY1CJHMEG6LP9ATu39YXvLRLyf995OkoQ,5315
|
|
94
94
|
nedo_vision_worker/worker/VideoStreamWorker.py,sha256=5n6v1PNO7IB-jj_McALLkUP-cBjJoIEw4UiSAs3vTb0,7606
|
|
95
95
|
nedo_vision_worker/worker/WorkerManager.py,sha256=2bxXi19fp3p1qjYBStYRdVVgko8dnevXx1_M_sqH5og,5521
|
|
96
96
|
nedo_vision_worker/worker/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
|
97
|
-
nedo_vision_worker-1.3.
|
|
98
|
-
nedo_vision_worker-1.3.
|
|
99
|
-
nedo_vision_worker-1.3.
|
|
100
|
-
nedo_vision_worker-1.3.
|
|
101
|
-
nedo_vision_worker-1.3.
|
|
97
|
+
nedo_vision_worker-1.3.5.dist-info/METADATA,sha256=S6qk8Fmb9pN2zpeAZ15Eqa8uxv85fSUIL6tWrV7S7OA,14728
|
|
98
|
+
nedo_vision_worker-1.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
99
|
+
nedo_vision_worker-1.3.5.dist-info/entry_points.txt,sha256=LrglS-8nCi8C_PL_pa6uxdgCe879hBETHDVXAckvs-8,60
|
|
100
|
+
nedo_vision_worker-1.3.5.dist-info/top_level.txt,sha256=vgilhlkyD34YsEKkaBabmhIpcKSvF3XpzD2By68L-XI,19
|
|
101
|
+
nedo_vision_worker-1.3.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|