target instanceof Node ? "node:{$this->target->uuid}" : "server:{$this->target->uuid}"; return "revoke-sftp:{$this->user}:{$target}"; } public function handle(DaemonRevocationRepository $repository): void { $node = $this->target instanceof Node ? $this->target : $this->target->node; try { $repository->setNode($node)->deauthorize( $this->user, $this->target instanceof Server ? [$this->target->uuid] : [] ); } catch (DaemonConnectionException) { // Keep retrying this job with a longer and longer backoff until we hit three // attempts at which point we stop and will assume the node is fully offline // and we are just wasting time. $this->release($this->attempts() * 10); } } }