mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
chore: filter certificates renewal task in maintenance by region
This commit is contained in:
parent
3eb5cd80f3
commit
3db9cd06d5
1 changed files with 9 additions and 0 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue