mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
chore: filter certificates renewal task in maintenance by region
This commit is contained in:
@@ -122,6 +122,15 @@ class Maintenance extends Action
|
||||
Console::info("[{$time}] Found " . \count($certificates) . " certificates for renewal, scheduling jobs.");
|
||||
|
||||
foreach ($certificates as $certificate) {
|
||||
$rule = $dbForPlatform->find('rules', [
|
||||
Query::equal('domain', [$certificate->getAttribute('domain')]),
|
||||
Query::limit(1),
|
||||
]);
|
||||
|
||||
if (!$rule[0] || $rule[0]->getAttribute('region') !== System::getEnv('_APP_REGION', 'default')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$queueForCertificate
|
||||
->setDomain(new Document([
|
||||
'domain' => $certificate->getAttribute('domain')
|
||||
|
||||
Reference in New Issue
Block a user