mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
feat: add subscription status checks for claiming monitor probes
This commit is contained in:
@@ -111,6 +111,10 @@ export class Service extends DatabaseService<MonitorProbe> {
|
||||
AND m."disableActiveMonitoring" = false
|
||||
AND m."deletedAt" IS NULL
|
||||
AND p."deletedAt" IS NULL
|
||||
AND (p."paymentProviderSubscriptionStatus" IS NULL
|
||||
OR p."paymentProviderSubscriptionStatus" IN ('active', 'trialing'))
|
||||
AND (p."paymentProviderMeteredSubscriptionStatus" IS NULL
|
||||
OR p."paymentProviderMeteredSubscriptionStatus" IN ('active', 'trialing'))
|
||||
ORDER BY mp."nextPingAt" ASC NULLS FIRST
|
||||
LIMIT $3
|
||||
FOR UPDATE OF mp SKIP LOCKED
|
||||
|
||||
Reference in New Issue
Block a user