GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - lstrojny/Procrastinator: Execute time consuming tasks as late as possible in a request

BranchesTags
Open more actions menu

Latest commit

 

History

65 Commits
65 Commits

Folders and files

NameName
Last commit message
Last commit date
build
build
 
 
src/Procrastinator
src/Procrastinator
 
 
tests/Procrastinator
tests/Procrastinator
 
 
vendor
vendor
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
README.md
README.md
 
 
build.xml
build.xml
 
 
composer.json
composer.json
 
 
phpunit.xml.dist
phpunit.xml.dist
 
 

Repository files navigation

Procrastinator for PHP: do stuff later

Gitter Build Status Dependency Status Average time to resolve an issue Percentage of issues still open

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

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();

About

Execute time consuming tasks as late as possible in a request

Resources

Readme
Activity

Stars

63 stars

Watchers

4 watching

Forks

5 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.