Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Better handling of schedule mutexpath files #12456

Closed
robjbrain opened this issue Feb 24, 2016 · 1 comment
Closed

Feature: Better handling of schedule mutexpath files #12456

robjbrain opened this issue Feb 24, 2016 · 1 comment

Comments

@robjbrain
Copy link
Contributor

At the moment the handling of the mutexpath files for scheduled commands is very limited.

If you find a mutex file in your storage directory that is a week old (for instance) it's impossible to know which command it is for for debugging purposes (it may be there legitimately, or may be a result of a command having crashed).

In order to get a list of scheduled tasks (for displaying in a dashboard for instance) you need to do the following:

public function index(\Illuminate\Contracts\Console\Kernel $kernel, \Illuminate\Console\Scheduling\Schedule $schedule)
{
    $kernel->schedule($schedule);
    dd($schedule->events());
}

But from there there mutexpath() method is protected so there is no way to manually check existence. e.g:

    $kernel->schedule($schedule);
    foreach($schedule->events() as $event) {
         dd(file_exists($event->mutexpath()));
    }

Would it be possible to make this more accessible and add more options for clearing/debugging stuck commands. This might involve:

  • Allow access to methods such as mutexpath()
  • Make mutexpath() files resolvable (find out what command they are from)
  • Some means of listing currently running commands
@GrahamCampbell
Copy link
Member

We're open to PRs. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants