added a help system, replaced the words "tenant" and "Pwa" with better alternatives. corrected and implemented cron jobs. prepared going live on a coolify-powered system.

This commit is contained in:
Codex Agent
2025-11-10 16:23:09 +01:00
parent ba9e64dfcb
commit 447a90a742
123 changed files with 6398 additions and 153 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace App\Console\Concerns;
use Illuminate\Contracts\Cache\Lock;
use Illuminate\Support\Facades\Cache;
use Illuminate\Support\Facades\Log;
trait InteractsWithCacheLocks
{
/**
* Attempt to acquire a cache-backed lock for the given command.
*
* @return \Illuminate\Contracts\Cache\Lock|false|null Returns the lock when acquired, false if another process holds it, null if locks are unsupported.
*/
protected function acquireCommandLock(string $name, int $seconds, bool $force = false): Lock|false|null
{
try {
$lock = Cache::lock($name, $seconds);
if ($force) {
$lock->forceRelease();
}
if ($lock->get()) {
return $lock;
}
return false;
} catch (\BadMethodCallException $exception) {
Log::channel('storage-jobs')->debug('Cache store does not support locks for command', [
'lock' => $name,
'store' => config('cache.default'),
'exception' => $exception->getMessage(),
]);
return null;
}
}
}