Add successful column to server_transfers table, get server transfers working properly :)
This commit is contained in:
parent
6ba6c34252
commit
454ce6ce45
8 changed files with 202 additions and 17 deletions
|
@ -11,18 +11,20 @@ class DaemonTransferRepository extends DaemonRepository
|
|||
{
|
||||
/**
|
||||
* @param Server $server
|
||||
* @param array $data
|
||||
* @param Node $node
|
||||
* @param string $token
|
||||
*
|
||||
* @throws DaemonConnectionException
|
||||
*/
|
||||
public function notify(Server $server, Node $node, string $token): void {
|
||||
public function notify(Server $server, array $data, Node $node, string $token): void {
|
||||
try {
|
||||
$this->getHttpClient()->post('/api/transfer', [
|
||||
'json' => [
|
||||
'server_id' => $server->uuid,
|
||||
'url' => $node->getConnectionAddress() . sprintf('/api/servers/%s/archive', $server->uuid),
|
||||
'token' => 'Bearer ' . $token,
|
||||
'server' => $data,
|
||||
],
|
||||
]);
|
||||
} catch(TransferException $exception) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue