Symfony2 integration for Procrastinator (lstrojny/procrastinator)

2.4.1 2014-01-19 22:49 UTC

This package is auto-updated.

Last update: 2024-06-16 05:33:03 UTC


ProcrastinatorBundle for Symfony2: do stuff later Build Status Dependency Status Average time to resolve an issue Percentage of issues still open

Symfony2 integration for Procrastinator

Example usage in controller to execute event only if the postFlush event in Doctrine occured

use Procrastinator\Deferred\DoctrineEventConditionalDeferred as Deferred;
use Doctrine\ORM\Events as OrmEvents;

class MyController ...
    public function sendMailAction()
        $entry = new Entity();
        $entry->setText('hello world');

        $message = Message::newInstance()
                    ->setBody('new entry');
        $mailer = $this->get('mailer');

                ->call(function() use ($mailer, $message) { $mailer->send($message); })

        $em = $this->get('doctrine.orm.default_entity_manager');