Update core/SQL_DUMPS/users.sql, core/bootstrap.php, core/migrations/000002_users.sql

Deleted core/partizan.php, test.php
This commit is contained in:
rsgrinko committed 2022-07-10 18:53:03 +00:00
1 parent acde8b4feb
commit f5aa2e57f8
5 files changed
+5 -141

No files matched your search

-30
View File
@@ -1,30 +0,0 @@
<?php
$_SERVER['DOCUMENT_ROOT'] = '/home/rsgrinko/sites/dev.it-stories.ru';
require_once $_SERVER['DOCUMENT_ROOT'] . '/core/bootstrap.php';
use Core\ExternalServices\TelegramSender;
use Core\Helpers\Log;
throw new Exception('test ololo');
//Log::logToSentry('Тестовая ошибка', 'ERROR', $_REQUEST);
die();
$numProc = 4;
if (empty($argv[1])) {
$currentRunThread = (int)exec('ps -awx | grep \'test.php\' | grep -v \'grep\' | wc -l');
echo 'Now running: ' . $currentRunThread . PHP_EOL;
while ($currentRunThread <= $numProc) {
echo 'Run new (' . $currentRunThread . ')' . PHP_EOL;
$handler = '(php -f /home/rsgrinko/sites/dev.it-stories.ru/test.php ' . $currentRunThread . ' &) >> /dev/null 2>&1';
passthru($handler);
$currentRunThread = (int)exec('ps -awx | grep \'test.php\' | grep -v \'grep\' | wc -l');
echo 'Now running: ' . $currentRunThread . PHP_EOL;
}
} else {
$res = (new TelegramSender(TELEGRAM_BOT_TOKEN))->setChat(TELEGRAM_NOTIFICATION_CHANNEL)->sendMessage('Start proc #' . $argv[1]);
Log::logToFile(json_encode($res, JSON_UNESCAPED_UNICODE), 'test.log', $argv[1]);
sleep(rand(2, 10));
$res = (new TelegramSender(TELEGRAM_BOT_TOKEN))->setChat(TELEGRAM_NOTIFICATION_CHANNEL)->sendMessage('End proc #' . $argv[1]);
Log::logToFile(json_encode($res, JSON_UNESCAPED_UNICODE), 'test.log', $argv[1]);
}