patch: added logs for maintenance task
This commit is contained in:
parent
9a05fedb6a
commit
4049f6470d
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue