Skip to content

Commit

Permalink
coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
jeppekroghitk committed Jan 15, 2024
1 parent f2ed1c8 commit 80fa10e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Command/SyncCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$io = new SymfonyStyle($input, $output);

$io->info('Processing projects');

$dataProviders = $this->dataProviderRepository->findAll();

foreach ($dataProviders as $dataProvider) {
$this->dataSynchronizationService->syncProjects(function ($i, $length) use ($io) {
if (0 == $i) {
Expand Down
2 changes: 1 addition & 1 deletion src/Command/SyncProjectsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$io = new SymfonyStyle($input, $output);

$dataProviders = $this->dataProviderRepository->findAll();

foreach ($dataProviders as $dataProvider) {
$this->dataSynchronizationService->syncProjects(function ($i, $length) use ($io) {
if (0 == $i) {
Expand Down
5 changes: 2 additions & 3 deletions src/Service/DataSynchronizationService.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function syncIssuesForProject(int $projectId, callable $progressCallback
}

$issuesProcessed = 0;

$startAt = 0;
do {
$dataProvider = $this->dataProviderRepository->find($dataProviderId);
Expand Down Expand Up @@ -249,14 +249,13 @@ public function syncIssuesForProject(int $projectId, callable $progressCallback
}

$startAt += self::MAX_RESULTS;
var_dump('<pre>'.print_r($startAt,true).'</pre>');

$this->entityManager->flush();
$this->entityManager->clear();
} while ($startAt < $total);

$this->entityManager->flush();
$this->entityManager->clear();

}

/**
Expand Down

0 comments on commit 80fa10e

Please sign in to comment.