Skip to content

Commit

Permalink
Fix get config and send config command to get config to agent
Browse files Browse the repository at this point in the history
  • Loading branch information
kleninmaxim committed May 2, 2022
1 parent e0f24fd commit b596779
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/receive_data.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ function handler_get_config(string $message): void

if ($data['event'] == 'config' && $data['node'] == 'configurator') {

$core_config = $data['data']['core_config'];
$core_config = $data['data']['configs']['core_config'];

$memcached->set(
'config',
$data['data']
$core_config
);

} else {
Expand Down Expand Up @@ -57,14 +57,14 @@ function handler_get_config(string $message): void
'event' => 'config',
'exchange' => EXCHANGE,
'instance' => NODE,
'action' => 'get_full_config',
'action' => 'get_config',
'algo' => ALGORITHM,
'data' => [],
'timestamp' => intval(microtime(true) * 1000000)
])
);

echo '[ERROR] Try to send command get_full_config to Agent. Code: ' . $code . PHP_EOL;
echo '[ERROR] Try to send command get_config to Agent. Code: ' . $code . PHP_EOL;

} while($code > 0);

Expand Down

0 comments on commit b596779

Please sign in to comment.