1
0
Fork 0
mirror of synced 2024-05-20 12:42:39 +12:00

patch: added logs for maintenance task

This commit is contained in:
Christy Jacob 2020-12-19 13:38:03 +05:30
parent 9a05fedb6a
commit 4049f6470d
3 changed files with 14 additions and 8 deletions

View file

@ -9,7 +9,6 @@ use Appwrite\Database\Document;
use Appwrite\Database\Adapter\MySQL as MySQLAdapter;
use Appwrite\Database\Adapter\Redis as RedisAdapter;
use Appwrite\Database\Validator\Authorization;
use Swoole\FastCGI\Record\Data;
use Utopia\App;
use Utopia\CLI\Console;
use Utopia\Config\Config;
@ -85,6 +84,8 @@ $cli
return $project->getId();
}, $projects);
Console::info("[ MAINTENANCE ] Notifying deletes workers every {$interval} seconds");
notifyDeleteExecutionLogs($projectIds);
notifyDeleteAbuseLogs($projectIds, $interval);
notifyDeleteAuditLogs($projectIds, $interval);

View file

@ -1,11 +1,5 @@
<?php
require_once __DIR__.'/../init.php';
\cli_set_process_title('Deletes V1 Worker');
echo APP_NAME.' deletes worker v1 has started'."\n";
use Appwrite\Database\Database;
use Appwrite\Database\Adapter\MySQL as MySQLAdapter;
use Appwrite\Database\Adapter\Redis as RedisAdapter;
@ -19,6 +13,12 @@ use Utopia\Config\Config;
use Utopia\Audit\Audit;
use Utopia\Audit\Adapters\MySQL as AuditAdapter;
require_once __DIR__.'/../init.php';
\cli_set_process_title('Deletes V1 Worker');
Console::success(APP_NAME.' deletes worker v1 has started'."\n");
class DeletesV1
{
@ -68,6 +68,11 @@ class DeletesV1
case DELETE_TYPE_ABUSE:
$this->deleteAbuseLogs($document);
break;
default:
Console::error('No delete operation for type: '.$type);
break;
}
}

View file

@ -7,7 +7,7 @@ require_once __DIR__.'/../init.php';
\cli_set_process_title('Mails V1 Worker');
echo APP_NAME.' mails worker v1 has started'."\n";
Console::success(APP_NAME.' mails worker v1 has started'."\n");
class MailsV1
{