From 35b704b92433e587335d4230b3894a43b6801fe9 Mon Sep 17 00:00:00 2001 From: ratana Date: Thu, 30 Mar 2023 15:25:27 +0700 Subject: [PATCH] disable_config_set_in_provider --- src/BrefServiceProvider.php | 45 ++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/src/BrefServiceProvider.php b/src/BrefServiceProvider.php index 931eec6..fc8fc55 100644 --- a/src/BrefServiceProvider.php +++ b/src/BrefServiceProvider.php @@ -49,6 +49,11 @@ public function register() $this->fixAwsCredentialsConfig(); + // Config::set('cache.stores.dynamodb.token', env('AWS_SESSION_TOKEN')); + // Config::set('filesystems.disks.s3.token', env('AWS_SESSION_TOKEN')); + // Config::set('queue.connections.sqs.token', env('AWS_SESSION_TOKEN')); + // Config::set('services.ses.token', env('AWS_SESSION_TOKEN')); + $this->app->when(QueueHandler::class) ->needs('$connection') ->giveConfig('queue.default'); @@ -73,26 +78,26 @@ public function boot(Dispatcher $dispatcher, LogManager $logManager, FailedJobPr ], 'bref-config'); } - $dispatcher->listen( - fn (JobProcessing $event) => $logManager->info( - "Processing job {$event->job->getJobId()}", - ['name' => $event->job->resolveName()] - ) - ); - - $dispatcher->listen( - fn (JobProcessed $event) => $logManager->info( - "Processed job {$event->job->getJobId()}", - ['name' => $event->job->resolveName()] - ) - ); - - $dispatcher->listen( - fn (JobExceptionOccurred $event) => $logManager->error( - "Job failed {$event->job->getJobId()}", - ['name' => $event->job->resolveName()] - ) - ); + // $dispatcher->listen( + // fn (JobProcessing $event) => $logManager->info( + // "Processing job {$event->job->getJobId()}", + // ['name' => $event->job->resolveName()] + // ) + // ); + + // $dispatcher->listen( + // fn (JobProcessed $event) => $logManager->info( + // "Processed job {$event->job->getJobId()}", + // ['name' => $event->job->resolveName()] + // ) + // ); + + // $dispatcher->listen( + // fn (JobExceptionOccurred $event) => $logManager->error( + // "Job failed {$event->job->getJobId()}", + // ['name' => $event->job->resolveName()] + // ) + // ); $dispatcher->listen( fn (JobFailed $event) => $queueFailer->log(