Skip to content

Commit

Permalink
Merge pull request #116 from CharlesBilbo/main
Browse files Browse the repository at this point in the history
fix memory leak in production environments;
  • Loading branch information
freekmurze authored Oct 25, 2022
2 parents 8f7c0c1 + 998a6fa commit c21309e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
20 changes: 20 additions & 0 deletions config/ignition.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
use Spatie\Ignition\Solutions\SolutionProviders\BadMethodCallSolutionProvider;
use Spatie\Ignition\Solutions\SolutionProviders\MergeConflictSolutionProvider;
use Spatie\Ignition\Solutions\SolutionProviders\UndefinedPropertySolutionProvider;
use Spatie\LaravelIgnition\Recorders\DumpRecorder\DumpRecorder;
use Spatie\LaravelIgnition\Recorders\JobRecorder\JobRecorder;
use Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder;
use Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\DefaultDbNameSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\GenericLaravelExceptionSolutionProvider;
use Spatie\LaravelIgnition\Solutions\SolutionProviders\IncorrectValetDbCredentialsSolutionProvider;
Expand Down Expand Up @@ -211,4 +215,20 @@

'settings_file_path' => '',

/*
|--------------------------------------------------------------------------
| Recorders
|--------------------------------------------------------------------------
|
| Ignition registers a couple of recorders when it is enabled. Below you may
| specify a recorders will be used to record specific events.
|
*/

'recorders' => [
DumpRecorder::class,
JobRecorder::class,
LogRecorder::class,
QueryRecorder::class
]
];
12 changes: 3 additions & 9 deletions src/IgnitionServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,9 @@ protected function registerLogHandler(): void

protected function startRecorders(): void
{
// TODO: Ignition feature toggles

$this->app->make(DumpRecorder::class)->start();

$this->app->make(LogRecorder::class)->start();

$this->app->make(QueryRecorder::class)->start();

$this->app->make(JobRecorder::class)->start();
foreach ($this->app->config['ignition.recorders'] as $recorder) {
$this->app->make($recorder)->start();
}
}

protected function configureQueue(): void
Expand Down

0 comments on commit c21309e

Please sign in to comment.