Andrew Wallo před 7 měsíci
rodič
revize
4a5c92646b
2 změnil soubory, kde provedl 6 přidání a 4 odebrání
  1. 2
    0
      app/Listeners/HandleTransactionImport.php
  2. 4
    4
      config/queue.php

+ 2
- 0
app/Listeners/HandleTransactionImport.php Zobrazit soubor

@@ -4,6 +4,7 @@ namespace App\Listeners;
4 4
 
5 5
 use App\Events\StartTransactionImport;
6 6
 use App\Jobs\ProcessTransactionImport;
7
+use App\Models\Accounting\Account;
7 8
 use Illuminate\Database\Eloquent\ModelNotFoundException;
8 9
 use Illuminate\Support\Facades\DB;
9 10
 
@@ -37,6 +38,7 @@ class HandleTransactionImport
37 38
                 throw new ModelNotFoundException("Account subtype '{$defaultAccountSubtypeName}' not found for company '{$company->name}'");
38 39
             }
39 40
 
41
+            /** @var Account $account */
40 42
             $account = $company->accounts()->create([
41 43
                 'name' => $connectedBankAccount->name,
42 44
                 'currency_code' => $connectedBankAccount->currency_code,

+ 4
- 4
config/queue.php Zobrazit soubor

@@ -40,7 +40,7 @@ return [
40 40
             'table' => env('DB_QUEUE_TABLE', 'jobs'),
41 41
             'queue' => env('DB_QUEUE', 'default'),
42 42
             'retry_after' => env('DB_QUEUE_RETRY_AFTER', 90),
43
-            'after_commit' => false,
43
+            'after_commit' => true,
44 44
         ],
45 45
 
46 46
         'beanstalkd' => [
@@ -49,7 +49,7 @@ return [
49 49
             'queue' => env('BEANSTALKD_QUEUE', 'default'),
50 50
             'retry_after' => env('BEANSTALKD_QUEUE_RETRY_AFTER', 90),
51 51
             'block_for' => 0,
52
-            'after_commit' => false,
52
+            'after_commit' => true,
53 53
         ],
54 54
 
55 55
         'sqs' => [
@@ -60,7 +60,7 @@ return [
60 60
             'queue' => env('SQS_QUEUE', 'default'),
61 61
             'suffix' => env('SQS_SUFFIX'),
62 62
             'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
63
-            'after_commit' => false,
63
+            'after_commit' => true,
64 64
         ],
65 65
 
66 66
         'redis' => [
@@ -69,7 +69,7 @@ return [
69 69
             'queue' => env('REDIS_QUEUE', 'default'),
70 70
             'retry_after' => env('REDIS_QUEUE_RETRY_AFTER', 90),
71 71
             'block_for' => null,
72
-            'after_commit' => false,
72
+            'after_commit' => true,
73 73
         ],
74 74
 
75 75
     ],

Načítá se…
Zrušit
Uložit