Commit 17934ed8c044ffb72e0b5426a5b3cc064cc49c3d
Exists in
master
Merge branch 'master' of http://gitlab.nologostudio.ru/alarionov/rekamore-su
Showing 1 changed file Side-by-side Diff
app/Console/Commands/DispatchVacancyLiftJobCommand.php
... | ... | @@ -16,7 +16,7 @@ class DispatchVacancyLiftJobCommand extends Command |
16 | 16 | { |
17 | 17 | $now = now()->timezone('Europe/Moscow')->format('H:i'); |
18 | 18 | |
19 | - $employers = EmployerAutoliftOption::query() | |
19 | + $employersAutoLift = EmployerAutoliftOption::query() | |
20 | 20 | ->where(function ($query) use ($now) { |
21 | 21 | $query->where('times_per_day', 1) |
22 | 22 | ->where('time_send_first', $now); |
... | ... | @@ -37,15 +37,20 @@ class DispatchVacancyLiftJobCommand extends Command |
37 | 37 | }); |
38 | 38 | |
39 | 39 | }) |
40 | - ->orWhere('time_send_tg', $now) | |
41 | 40 | ->get(); |
42 | 41 | |
42 | + | |
43 | + | |
43 | 44 | LiftVacancyJob::dispatch( |
44 | - $employers->whereNotNull('time_send_first')->pluck('employer_id')->toArray(), | |
45 | + $employersAutoLift->whereNotNull('time_send_first')->pluck('employer_id')->toArray(), | |
45 | 46 | ); |
46 | 47 | |
48 | + $employersSendTelegramm = EmployerAutoliftOption::query() | |
49 | + ->where('time_send_tg', $now) | |
50 | + ->get(); | |
51 | + | |
47 | 52 | SendVacancyToTelegramJob::dispatch( |
48 | - $employers->whereNotNull('time_send_tg')->pluck('employer_id')->toArray() | |
53 | + $employersSendTelegramm->whereNotNull('time_send_tg')->pluck('employer_id')->toArray() | |
49 | 54 | ); |
50 | 55 | |
51 | 56 | return Command::SUCCESS; |