alanalbert/laravel_mutex

Get the mutex file path of command in laravel.

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/alanalbert/laravel_mutex

1.0.1 2020-11-11 16:11 UTC

This package is auto-updated.

Last update: 2025-10-20 21:45:55 UTC


README

Get the file mutex path of command in laravel or lumen.

获取laravel或lumen的命令文件锁路径。

Usage

  1. Install
    composer require alanalbert/laravel_mutex --dev
  2. Code
     $path = get_command_mutex(function (\Illuminate\Console\Scheduling\Schedule $schedule) {
         // schedule command
         return $schedule->command('test')->withoutOverlapping()->runInBackground();
     });
    You can find the file in storage/framework/cache/data.

Different environments will get different paths. 不同的运行环境将会得到不同的文件锁路径。