| @@ 112-119 (lines=8) @@ | ||
| 109 | $input->getOption('port') |
|
| 110 | ); |
|
| 111 | ||
| 112 | if ($watch) { |
|
| 113 | $httpServer->addPeriodicTimer(1, function () use ($sourceSet) { |
|
| 114 | clearstatcache(); |
|
| 115 | $sourceSet->reset(); |
|
| 116 | ||
| 117 | $this->sculpin->run($this->compositeDataSource, $sourceSet); |
|
| 118 | }); |
|
| 119 | } |
|
| 120 | ||
| 121 | $httpServer->run(); |
|
| 122 | } else { |
|
| @@ 122-132 (lines=11) @@ | ||
| 119 | } |
|
| 120 | ||
| 121 | $httpServer->run(); |
|
| 122 | } else { |
|
| 123 | do { |
|
| 124 | $this->sculpin->run($this->compositeDataSource, $sourceSet); |
|
| 125 | ||
| 126 | if ($watch) { |
|
| 127 | sleep(2); |
|
| 128 | clearstatcache(); |
|
| 129 | $sourceSet->reset(); |
|
| 130 | } |
|
| 131 | } while ($watch); |
|
| 132 | } |
|
| 133 | } |
|
| 134 | ||
| 135 | private function clean(OutputInterface $output, string $dir) |
|