2017 © Pedro PelĂĄez
 

library procrastinator

Do things as late as possible in a request. Don’t let your users wait

image

lstrojny/procrastinator

Do things as late as possible in a request. Don’t let your users wait

  • Sunday, February 26, 2017
  • by lstrojny
  • Repository
  • 5 Watchers
  • 48 Stars
  • 21,487 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

Procrastinator for PHP: do stuff later

Gitter Build Status Dependency Status Average time to resolve an issue Percentage of issues still open, (*1)

A few classes to help you executing complicated tasks (like sending mails) later., (*2)

Example using fastcgi_finish_request() to finish request before executing tasks

<?php
$procrastinator = new \Procrastinator\DeferralManager(
    new \Procrastinator\Scheduler\OnRegisterShutdownScheduler(),
    new \Procrastinator\Executor\Decorator\PhpFpmExecutorDecorator(
        new \Procrastinator\Executor\SingleThreadExecutor()
    )
);

// The rough way
$procrastinator->register(
    new \Procrastinator\Deferred\CallbackDeferred(
        'some name',
        function() {sleep(10);}
    )
);

// Or use the more convenient builder interface
$procrastinator->register(
    $procrastinator
        ->newDeferred()
        ->name('some other name')
        ->call(function() {sleep(10);}
        ->build()
);

$procrastinator->schedule();

The Versions

26/02 2017

dev-master

9999999-dev

Do things as late as possible in a request. Don’t let your users wait

  Sources   Download

MIT

The Requires

 

The Development Requires

26/02 2017

0.8.0

0.8.0.0

Do things as late as possible in a request. Don’t let your users wait

  Sources   Download

MIT

The Requires

 

The Development Requires

19/01 2014

0.6.1

0.6.1.0

Do things as late as possible in a request. Don’t let your users wait

  Sources   Download

MIT

The Requires

 

The Development Requires

13/09 2013

0.6.0

0.6.0.0

Do things as late as possible in a request. Don’t let your users wait

  Sources   Download

MIT

The Requires

 

The Development Requires