|
32 | 32 | UptimeStatus,
|
33 | 33 | UptimeSubscription,
|
34 | 34 | UptimeSubscriptionRegion,
|
35 |
| - get_project_subscriptions_for_uptime_subscription, |
| 35 | + get_project_subscription_for_uptime_subscription, |
36 | 36 | get_top_hosting_provider_names,
|
37 | 37 | load_regions_for_uptime_subscription,
|
38 | 38 | )
|
@@ -292,29 +292,12 @@ def handle_result(self, subscription: UptimeSubscription | None, result: CheckRe
|
292 | 292 |
|
293 | 293 | try_check_and_update_regions(subscription, result, subscription_regions)
|
294 | 294 |
|
295 |
| - project_subscriptions = get_project_subscriptions_for_uptime_subscription(subscription.id) |
| 295 | + project_subscription = get_project_subscription_for_uptime_subscription(subscription.id) |
296 | 296 |
|
297 | 297 | cluster = _get_cluster()
|
298 |
| - last_updates: list[str | None] = cluster.mget( |
299 |
| - build_last_update_key(sub) for sub in project_subscriptions |
300 |
| - ) |
301 |
| - |
302 |
| - for last_update_raw, project_subscription in zip(last_updates, project_subscriptions): |
303 |
| - last_update_ms = 0 if last_update_raw is None else int(last_update_raw) |
304 |
| - self.handle_result_for_project( |
305 |
| - project_subscription, |
306 |
| - result, |
307 |
| - last_update_ms, |
308 |
| - metric_tags.copy(), |
309 |
| - ) |
| 298 | + last_update_raw: str | None = cluster.get(build_last_update_key(project_subscription)) |
| 299 | + last_update_ms = 0 if last_update_raw is None else int(last_update_raw) |
310 | 300 |
|
311 |
| - def handle_result_for_project( |
312 |
| - self, |
313 |
| - project_subscription: ProjectUptimeSubscription, |
314 |
| - result: CheckResult, |
315 |
| - last_update_ms: int, |
316 |
| - metric_tags: dict[str, str], |
317 |
| - ): |
318 | 301 | if features.has(
|
319 | 302 | "organizations:uptime-detailed-logging", project_subscription.project.organization
|
320 | 303 | ):
|
|
0 commit comments