detectkit 0.2.4__tar.gz → 0.2.5__tar.gz
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.
- {detectkit-0.2.4/detectkit.egg-info → detectkit-0.2.5}/PKG-INFO +1 -1
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/database/clickhouse_manager.py +14 -1
- {detectkit-0.2.4 → detectkit-0.2.5/detectkit.egg-info}/PKG-INFO +1 -1
- {detectkit-0.2.4 → detectkit-0.2.5}/pyproject.toml +1 -1
- {detectkit-0.2.4 → detectkit-0.2.5}/LICENSE +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/MANIFEST.in +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/README.md +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/alerting/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/alerting/channels/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/alerting/channels/base.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/alerting/channels/email.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/alerting/channels/factory.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/alerting/channels/mattermost.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/alerting/channels/slack.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/alerting/channels/telegram.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/alerting/channels/webhook.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/alerting/orchestrator.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/cli/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/cli/commands/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/cli/commands/init.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/cli/commands/run.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/cli/commands/test_alert.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/cli/main.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/config/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/config/metric_config.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/config/profile.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/config/project_config.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/config/validator.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/core/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/core/interval.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/core/models.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/database/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/database/internal_tables.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/database/manager.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/database/tables.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/detectors/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/detectors/base.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/detectors/factory.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/detectors/statistical/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/detectors/statistical/iqr.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/detectors/statistical/mad.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/detectors/statistical/manual_bounds.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/detectors/statistical/zscore.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/loaders/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/loaders/metric_loader.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/loaders/query_template.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/orchestration/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/orchestration/task_manager.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/utils/__init__.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit/utils/stats.py +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit.egg-info/SOURCES.txt +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit.egg-info/dependency_links.txt +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit.egg-info/entry_points.txt +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit.egg-info/requires.txt +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/detectkit.egg-info/top_level.txt +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/requirements.txt +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/setup.cfg +0 -0
- {detectkit-0.2.4 → detectkit-0.2.5}/setup.py +0 -0
|
@@ -300,7 +300,20 @@ class ClickHouseDatabaseManager(BaseDatabaseManager):
|
|
|
300
300
|
result = self.execute_query(query, {"metric_name": metric_name})
|
|
301
301
|
|
|
302
302
|
if result and result[0]["last_ts"]:
|
|
303
|
-
|
|
303
|
+
last_ts = result[0]["last_ts"]
|
|
304
|
+
|
|
305
|
+
# ClickHouse returns epoch (1970-01-01 00:00:00) for NULL datetime
|
|
306
|
+
# Detect this and treat as None to avoid loading from 1970
|
|
307
|
+
epoch = datetime(1970, 1, 1, 0, 0, 0)
|
|
308
|
+
|
|
309
|
+
# Handle both timezone-aware and naive datetimes
|
|
310
|
+
if last_ts.tzinfo is not None:
|
|
311
|
+
epoch = epoch.replace(tzinfo=last_ts.tzinfo)
|
|
312
|
+
|
|
313
|
+
if last_ts == epoch:
|
|
314
|
+
return None
|
|
315
|
+
|
|
316
|
+
return last_ts
|
|
304
317
|
|
|
305
318
|
return None
|
|
306
319
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|