Skip to content

Commit

Permalink
disable_config_set_in_provider
Browse files Browse the repository at this point in the history
  • Loading branch information
hengratana committed Aug 2, 2024
1 parent 7727eb0 commit 35b704b
Showing 1 changed file with 25 additions and 20 deletions.
45 changes: 25 additions & 20 deletions src/BrefServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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(
Expand Down

0 comments on commit 35b704b

Please sign in to comment.