Skip to content

Commit a01ad6e

Browse files
committed
Fix scheduled seat locking not working.
1 parent 4d8c028 commit a01ad6e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/Console/Commands/UpdateEventSeatingLock.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class UpdateEventSeatingLock extends Command
2828
*/
2929
public function handle()
3030
{
31-
Event::where('seating_opens_at', '<', Carbon::now())->chunk(100, function($chunk) {
31+
Event::where('seating_opens_at', '<=', Carbon::now())->chunk(100, function($chunk) {
3232
foreach ($chunk as $event) {
3333
$this->output->writeln("{$event} Unlocking seating");
3434
Log::info("{$event}: Unlocking seating");
@@ -37,11 +37,11 @@ public function handle()
3737
$event->save();
3838
}
3939
});
40-
Event::where('seating_closes_at', '<', Carbon::now())->chunk(100, function($chunk) {
40+
Event::where('seating_closes_at', '<=', Carbon::now())->chunk(100, function($chunk) {
4141
foreach ($chunk as $event) {
4242
$this->output->writeln("{$event} Locking seating");
4343
Log::info("{$event}: Locking seating");
44-
$event->seating_locked = false;
44+
$event->seating_locked = true;
4545
$event->seating_closes_at = null;
4646
$event->save();
4747
}

0 commit comments

Comments
 (0)