Mono repository for everything long running
This is the LongRunning mono repository for the following packages:
:warning: Instead of installing this mono repository we recommend you to install the sub packages instead. See above.
composer require long-running/long-runningIf you are using Symfony, make sure to enable the bundle:
['all' => true],
];cleanUp();
}If you are using Symfony, any service that implements the LongRunning\Core\Cleaner interface
will be autoconfigured and added to the LongRunning\Core\DelegatingCleaner.
The LongRunning\Core\DelegatingCleaner is aliased to LongRunning\Core\Cleaner.
That means that you can inject the LongRunning\Core\Cleaner service in your worker and it will
call all configured cleaners on cleanUp():
cleaner = $cleaner;
}
public function doWork() : void
{
while (true) {
// Do heavy work, like processing jobs from a queue
echo "Doing heavy work";
sleep(1);
echo "Done with heavy work";
// Cleanup things
$this->cleaner->cleanUp();
}
}
}LongRunning provides 2 packages that add additional cleaners:
If you are coming from LongRunning 0.5.0 please refer to UPGRADING.md.
No open issues yet, or sync has not completed.