Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
47 | public function handle() |
||
48 | { |
||
49 | $tenantId = $this->argument('tenantId'); |
||
50 | $tenant = Tenant::find($tenantId); |
||
51 | |||
52 | if (!$tenant) { |
||
53 | throw new RuntimeException('Tenant with ID = '.$tenantId.' does not exist.'); |
||
|
|||
54 | } |
||
55 | |||
56 | $this->tenantManager->setTenant($tenant); |
||
57 | \DB::purge('tenant'); |
||
58 | |||
59 | $candidates = Candidate::whereNull('photo_extraction')->where('path_to_cv', '<>', '')->get(); |
||
60 | |||
61 | foreach ($candidates as $candidate) { |
||
62 | $this->info('Parsing candidate id '.$candidate->id); |
||
63 | ProcessResume::dispatchNow($candidate); |
||
64 | gc_collect_cycles(); |
||
65 | } |
||
68 |