Skip to content

Commit

Permalink
Merge pull request #5 from achmadhadikurnia/main
Browse files Browse the repository at this point in the history
 add info takes time for all endpoin tasks and all task
  • Loading branch information
achmadhadikurnia committed Feb 24, 2024
2 parents 600b12b + fe146e7 commit 1490280
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Commands/PullRiwayatCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public function handle()
}
}

$start = now();
$startPegawai = now();
$endpoints = $endpoints->keys();
$endpointCount = $endpoints->count();
$pegawais = $nipBaru ? Pegawai::where('nip_baru', $nipBaru)->get() : Pegawai::get();
Expand All @@ -111,6 +111,7 @@ public function handle()
$iPegawai = $skip;

$pegawais->each(function ($pegawai) use ($pegawaiCount, &$iPegawai, $endpoints, $endpointCount) {
$startEndpoint = now();
$iPegawai++;
$iEndpoint = 0;

Expand Down Expand Up @@ -172,11 +173,12 @@ public function handle()
}
});

$this->comment("All endpoint tasks are processed in {$startEndpoint->shortAbsoluteDiffForHumans(now(), 1)}");
$this->newLine();
});

$this->newLine();
$this->comment("All tasks are processed in {$start->shortAbsoluteDiffForHumans(now(), 1)}");
$this->comment("All tasks are processed in {$startPegawai->shortAbsoluteDiffForHumans(now(), 1)}");

return self::SUCCESS;
}
Expand Down

0 comments on commit 1490280

Please sign in to comment.