$pool =
new Pool($this->client,
$list,
[ 'concurrency' =>
$this->concurrency,
'rejected' =>
function DTransferException
$reason): void
{ if ($reason instanceof ServerException
) { throw new \
RuntimeException(\
sprintf('BAN request failed to %s failed with error: %s',
$reason->
getRequest()->
getUri()->
__toString(),
$reason->
getMessage()), 0,
$reason);
} throw $reason;
},
]);
$pool->
promise()->
wait();
} public function banAll(): void
{ if ($this->instanceTag !== ''
) { $this->
invalidate([$this->instanceTag
]);
return;
} $this->client->
post(\
sprintf('%s/service/%s/purge_all', self::API_URL,
$this->serviceId
),
[