mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-02 15:51:49 +02:00
Small component rename
This commit is contained in:
parent
2b9cffd634
commit
6907049880
2 changed files with 10 additions and 6 deletions
|
@ -26,11 +26,14 @@ require_once 'helpers.php';
|
|||
$server = new Server("127.0.0.1", 8250);
|
||||
$server->set([
|
||||
'daemonize' => false,
|
||||
'log_file' => '/var/log/namingo/notifications.log',
|
||||
'log_file' => '/var/log/namingo/messagebroker_application.log',
|
||||
'log_level' => SWOOLE_LOG_INFO,
|
||||
'worker_num' => swoole_cpu_num() * 2,
|
||||
'pid_file' => '/var/run/notifications.pid'
|
||||
'pid_file' => '/var/run/messagebroker.pid'
|
||||
]);
|
||||
$logFilePath = '/var/log/namingo/messagebroker.log';
|
||||
$log = setupLogger($logFilePath, 'Message_Broker');
|
||||
$log->info('job started.');
|
||||
|
||||
$server->on("request", function (Request $request, Response $response) use ($c) {
|
||||
// Parse the received data
|
||||
|
@ -132,7 +135,8 @@ $server->on("request", function (Request $request, Response $response) use ($c)
|
|||
$response->end(json_encode(['status' => 'error', 'message' => 'Unknown action']));
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$log->info('job finished successfully.');
|
||||
$response->end(json_encode(['status' => 'success']));
|
||||
});
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue