From 2f9e1b426076ee38b4ddb50c478947c96a9c96e5 Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Wed, 20 Mar 2024 07:48:54 +0000 Subject: [PATCH] Fix cron job query --- src/Console/ClearLocks.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Console/ClearLocks.php b/src/Console/ClearLocks.php index 0eeafbd..4c3ef42 100644 --- a/src/Console/ClearLocks.php +++ b/src/Console/ClearLocks.php @@ -32,7 +32,8 @@ public function handle() $this->info('Clearing locks...'); $this->line(''); - LockModel::where('updated_by', '<', Carbon::now()->subMinutes(config('statamic-locks.clear_locks_after', 5))) + LockModel::where('updated_at', '<', Carbon::now()->subMinutes(config('statamic-locks.clear_locks_after', 5))) + ->get() ->each ->delete();