@@ -3,13 +3,11 @@ |
||
| 3 | 3 | namespace Popstas\Transmission\Console; |
| 4 | 4 | |
| 5 | 5 | use GuzzleHttp; |
| 6 | -use GuzzleHttp\Exception\ConnectException; |
|
| 7 | 6 | use InfluxDB; |
| 8 | 7 | use Popstas\Transmission\Console\Command; |
| 9 | 8 | use Psr\Log\LoggerInterface; |
| 10 | 9 | use Stecman\Component\Symfony\Console\BashCompletion; |
| 11 | 10 | use Symfony\Component\Console\Application as BaseApplication; |
| 12 | -use Symfony\Component\Console\Input\InputInterface; |
|
| 13 | 11 | |
| 14 | 12 | class Application extends BaseApplication |
| 15 | 13 | { |
@@ -111,6 +111,9 @@ |
||
| 111 | 111 | ); |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | + /** |
|
| 115 | + * @param string $transmissionHost |
|
| 116 | + */ |
|
| 114 | 117 | public function getLastPoint(array $torrent, $transmissionHost) |
| 115 | 118 | { |
| 116 | 119 | $this->connectDatabase(); |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - $this->dryRun($input, $output, function () use ($influxDbClient, $points, $logger) { |
|
| 73 | + $this->dryRun($input, $output, function() use ($influxDbClient, $points, $logger) { |
|
| 74 | 74 | $isSuccess = $influxDbClient->writePoints($points); |
| 75 | 75 | $logger->info('InfluxDB write ' . ($isSuccess ? 'success' : 'failed')); |
| 76 | 76 | }, 'dry-run, don\'t really send points'); |