Fixes for Sentinel timeouts

This commit is contained in:
David Bomba 2021-11-11 11:35:58 +11:00
parent 906f2b30a4
commit f5ea8a83f0
5 changed files with 12 additions and 10 deletions

View File

@ -83,7 +83,7 @@ class ImportController extends Controller {
$contents = file_get_contents( $file->getPathname() );
// Store the csv in cache with an expiry of 10 minutes
Cache::put( $hash . '-' . $entityType, base64_encode( $contents ), 3600 );
Cache::put( $hash . '-' . $entityType, base64_encode( $contents ), 600 );
// Parse CSV
$csv_array = $this->getCsvData( $contents );
@ -111,7 +111,7 @@ class ImportController extends Controller {
$contents = file_get_contents( $file->getPathname() );
// Store the csv in cache with an expiry of 10 minutes
Cache::put( $hash . '-' . $entityType, base64_encode( $contents ), 3600 );
Cache::put( $hash . '-' . $entityType, base64_encode( $contents ), 600 );
}
}

View File

@ -587,7 +587,7 @@ class CSVImport implements ShouldQueue {
}
private function getCsvData( $entityType ) {
$base64_encoded_csv = Cache::get( $this->hash . '-' . $entityType );
$base64_encoded_csv = Cache::pull( $this->hash . '-' . $entityType );
if ( empty( $base64_encoded_csv ) ) {
return null;
}

View File

@ -52,6 +52,10 @@ class InvoiceCreatedNotification implements ShouldQueue
/* The User */
$user = $company_user->user;
if(!$user)
continue;
/* This is only here to handle the alternate message channels - ie Slack */
// $notification = new EntitySentNotification($event->invitation, 'invoice');
@ -71,11 +75,6 @@ class InvoiceCreatedNotification implements ShouldQueue
}
/* Override the methods in the Notification Class */
// $notification->method = $methods;
// Notify on the alternate channels
// $user->notify($notification);
}
}
}

View File

@ -53,6 +53,9 @@ class QuoteCreatedNotification implements ShouldQueue
/* The User */
$user = $company_user->user;
if(!$user)
continue;
/* This is only here to handle the alternate message channels - ie Slack */
// $notification = new EntitySentNotification($event->invitation, 'quote');

View File

@ -207,7 +207,7 @@ return [
['options' => [
'replication' => 'sentinel',
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
'sentinel_timeout' => 1.0,
'sentinel_timeout' => 2.0,
'parameters' => [
'password' => env('REDIS_PASSWORD', null),
'database' => env('REDIS_DB', 0),
@ -226,7 +226,7 @@ return [
['options' => [
'replication' => 'sentinel',
'service' => env('REDIS_SENTINEL_SERVICE', 'mymaster'),
'sentinel_timeout' => 1.0,
'sentinel_timeout' => 2.0,
'parameters' => [
'password' => env('REDIS_PASSWORD', null),
'database' => env('REDIS_CACHE_DB', 1),