https://github.com/longrunning/longrunning
Mono repository for everything long running
https://github.com/longrunning/longrunning
php
Last synced: 4 months ago
JSON representation
Mono repository for everything long running
- Host: GitHub
- URL: https://github.com/longrunning/longrunning
- Owner: LongRunning
- License: mit
- Created: 2015-03-11T20:02:04.000Z (almost 11 years ago)
- Default Branch: main
- Last Pushed: 2024-01-31T16:55:16.000Z (about 2 years ago)
- Last Synced: 2025-09-21T01:29:44.792Z (5 months ago)
- Topics: php
- Language: PHP
- Homepage:
- Size: 201 KB
- Stars: 192
- Watchers: 7
- Forks: 18
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LongRunning

This is the LongRunning mono repository for the following packages:
* [core](https://github.com/LongRunning/core)
* [doctrine-orm](https://github.com/LongRunning/doctrine-orm)
* [sentry](https://github.com/LongRunning/sentry)
## Installation
:warning: Instead of installing this mono repository we recommend you to install the sub packages instead. See above.
```
composer require long-running/long-running
```
## Symfony
If you are using Symfony, make sure to enable the bundle:
```php
['all' => true],
];
```
## How to use?
```php
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()`:
```php
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();
}
}
}
```
## Existing cleaners
LongRunning provides 2 packages that add additional cleaners:
* [doctrine-orm](https://github.com/LongRunning/doctrine-orm)
* [sentry](https://github.com/LongRunning/sentry)
## Upgrading
If you are coming from LongRunning 0.5.0 please refer to [UPGRADING.md](UPGRADING.md).