mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
chore: improve check
This commit is contained in:
parent
3db9cd06d5
commit
1731212ebb
1 changed files with 2 additions and 3 deletions
|
|
@ -122,12 +122,11 @@ class Maintenance extends Action
|
|||
Console::info("[{$time}] Found " . \count($certificates) . " certificates for renewal, scheduling jobs.");
|
||||
|
||||
foreach ($certificates as $certificate) {
|
||||
$rule = $dbForPlatform->find('rules', [
|
||||
$rule = $dbForPlatform->findOne('rules', [
|
||||
Query::equal('domain', [$certificate->getAttribute('domain')]),
|
||||
Query::limit(1),
|
||||
]);
|
||||
|
||||
if (!$rule[0] || $rule[0]->getAttribute('region') !== System::getEnv('_APP_REGION', 'default')) {
|
||||
if ($rule->isEmpty() || $rule->getAttribute('region') !== System::getEnv('_APP_REGION', 'default')) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue