From 9c9575396b2e4ab8db33848a04e5b2b39dda679e Mon Sep 17 00:00:00 2001 From: drkthunder02 Date: Wed, 19 May 2021 00:57:22 +0900 Subject: [PATCH] queue default to construct of job --- app/Console/Kernel.php | 13 ------------- app/Jobs/Commands/Assets/FetchAllianceAssets.php | 1 + app/Jobs/Commands/Assets/ProcessAllianceAssets.php | 1 + app/Jobs/Commands/Assets/PurgeAllianceAssets.php | 1 + app/Jobs/Commands/Data/PurgeUsers.php | 1 + app/Jobs/Commands/Eve/ItemPricesUpdate.php | 1 + app/Jobs/Commands/Eve/SendEveMail.php | 1 + .../Finances/UpdateAllianceWalletJournalJob.php | 1 + .../Finances/UpdateAllianceWalletJournalPage.php | 3 +++ app/Jobs/Commands/Finances/UpdateItemPrices.php | 1 + .../MiningTaxes/CreateMiningTaxesInvoice.php | 3 ++- .../MiningTaxes/FetchMiningTaxesLedgers.php | 1 + .../MiningTaxes/FetchMiningTaxesObservers.php | 1 + .../MiningTaxes/PreFetchMiningTaxesLedgers.php | 1 + .../MiningTaxes/ProcessMiningTaxesLedgers.php | 1 + .../MiningTaxes/ProcessMiningTaxesPayments.php | 1 + .../MiningTaxes/SendMiningTaxesInvoices.php | 3 ++- .../MiningTaxes/SendMiningTaxesInvoicesOld.php | 1 + .../UpdateMiningTaxesLateInvoices15th.php | 3 ++- .../UpdateMiningTaxesLateInvoices1st.php | 3 ++- .../Structures/ProcessAllianceStructures.php | 1 + .../Commands/Structures/PurgeAllianceStructures.php | 1 + 22 files changed, 27 insertions(+), 17 deletions(-) diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 43918d450..9b8f92c2b 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -60,7 +60,6 @@ class Kernel extends ConsoleKernel * Purge Data Schedule */ $schedule->job(new PurgeUsersJob) - ->onQueue('default') ->weekly(); /** @@ -68,7 +67,6 @@ class Kernel extends ConsoleKernel */ $schedule->job(new UpdateAllianceWalletJournalJob) ->hourlyAt('45') - ->onQueue('finances') ->withoutOverlapping(); /** @@ -76,7 +74,6 @@ class Kernel extends ConsoleKernel */ $schedule->job(new UpdateItemPricesJob) ->hourlyAT('30') - ->onQueue('default') ->withoutOverlapping(); /** @@ -84,27 +81,21 @@ class Kernel extends ConsoleKernel */ $schedule->job(new FetchMiningTaxesObservers) ->dailyAt('22:00') - ->onQueue('miningtaxes') ->withoutOverlapping(); $schedule->job(new PreFetchMiningTaxesLedgers) ->dailyAt('20:00') - ->onQueue('miningtaxes') ->withoutOverlapping(); $schedule->job(new SendMiningTaxesInvoices) ->weeklyOn(1, '06:00') - ->onQueue('miningtaxes') ->withoutOverlapping(); $schedule->job(new ProcessMiningTaxesPayments) ->hourlyAt('15') - ->onQueue('miningtaxes') ->withoutOverlapping(); $schedule->job(new UpdateMiningTaxesLateInvoices1st) ->monthlyOn(1, '16:00') - ->onQueue('miningtaxes') ->withoutOverlapping(); $schedule->job(new UpdateMiningTaxesLateInvoices15th) ->monthlyOn(15, '16:00') - ->onQueue('miningtaxes') ->withoutOverlapping(); /** @@ -112,19 +103,15 @@ class Kernel extends ConsoleKernel */ $schedule->job(new FetchAllianceStructures) ->dailyAt('21:00') - ->onQueue('structures') ->withoutOverlapping(); $schedule->job(new FetchAllianceAssets) ->hourlyAt('15') - ->onQueue('structures') ->withoutOverlapping(); $schedule->job(new PurgeAllianceStructures) ->monthlyOn(2, '14:00') - ->onQueue('structures') ->withoutOverlapping(); $schedule->job(new PurgeAllianceAssets) ->monthlyOn(2, '15:00') - ->onQueue('structures') ->withoutOverlapping(); } diff --git a/app/Jobs/Commands/Assets/FetchAllianceAssets.php b/app/Jobs/Commands/Assets/FetchAllianceAssets.php index afd0b0132..8ca5da56e 100644 --- a/app/Jobs/Commands/Assets/FetchAllianceAssets.php +++ b/app/Jobs/Commands/Assets/FetchAllianceAssets.php @@ -44,6 +44,7 @@ class FetchAllianceAssets implements ShouldQueue { //Set the connection for the job $this->connection = 'redis'; + $this->onQueue('structures'); } diff --git a/app/Jobs/Commands/Assets/ProcessAllianceAssets.php b/app/Jobs/Commands/Assets/ProcessAllianceAssets.php index c1e7d5a69..a39fa1058 100644 --- a/app/Jobs/Commands/Assets/ProcessAllianceAssets.php +++ b/app/Jobs/Commands/Assets/ProcessAllianceAssets.php @@ -42,6 +42,7 @@ class ProcessAllianceAssets implements ShouldQueue { //Set the connection for the job $this->connection = 'redis'; + $this->onQueue('structures'); $this->asset = $a; } diff --git a/app/Jobs/Commands/Assets/PurgeAllianceAssets.php b/app/Jobs/Commands/Assets/PurgeAllianceAssets.php index 212e50616..b4d1b5199 100644 --- a/app/Jobs/Commands/Assets/PurgeAllianceAssets.php +++ b/app/Jobs/Commands/Assets/PurgeAllianceAssets.php @@ -42,6 +42,7 @@ class PurgeAllianceAssets implements ShouldQueue { //Set the connection for the job $this->connection = 'redis'; + $this->onQueue('structures'); } /** diff --git a/app/Jobs/Commands/Data/PurgeUsers.php b/app/Jobs/Commands/Data/PurgeUsers.php index d280c5fa2..fa19dc5e9 100644 --- a/app/Jobs/Commands/Data/PurgeUsers.php +++ b/app/Jobs/Commands/Data/PurgeUsers.php @@ -49,6 +49,7 @@ class PurgeUsers implements ShouldQueue public function __construct() { $this->connection = 'redis'; + $this->onQueue('default'); } /** diff --git a/app/Jobs/Commands/Eve/ItemPricesUpdate.php b/app/Jobs/Commands/Eve/ItemPricesUpdate.php index 3a3bf3d6f..3bc9f98da 100644 --- a/app/Jobs/Commands/Eve/ItemPricesUpdate.php +++ b/app/Jobs/Commands/Eve/ItemPricesUpdate.php @@ -38,6 +38,7 @@ class ItemPricesUpdate implements ShouldQueue public function __construct() { $this->connection = 'redis'; + $this->onQueue('default'); } /** diff --git a/app/Jobs/Commands/Eve/SendEveMail.php b/app/Jobs/Commands/Eve/SendEveMail.php index 632a91672..383313013 100644 --- a/app/Jobs/Commands/Eve/SendEveMail.php +++ b/app/Jobs/Commands/Eve/SendEveMail.php @@ -50,6 +50,7 @@ class SendEveMail implements ShouldQueue public function __construct($body, $recipient, $recipient_type, $subject, $sender) { //Set the connection $this->connection = 'redis'; + $this->onQueue('mail'); //Set the middleware for the job $this->middleware = $this->middleware(); diff --git a/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalJob.php b/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalJob.php index 16321837c..a4d47b56a 100644 --- a/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalJob.php +++ b/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalJob.php @@ -42,6 +42,7 @@ class UpdateAllianceWalletJournalJob implements ShouldQueue public function __construct() { $this->connection = 'redis'; + $this->onQueue('finances'); } /** diff --git a/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalPage.php b/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalPage.php index c291a0a1d..70f3182cc 100644 --- a/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalPage.php +++ b/app/Jobs/Commands/Finances/UpdateAllianceWalletJournalPage.php @@ -51,6 +51,9 @@ class UpdateAllianceWalletJournalPage implements ShouldQueue */ public function __construct($division, $charId, $page) { + $this->connection = 'redis'; + $this->onQueue('finances'); + $this->division = $division; $this->charId = $charId; $this->page = $page; diff --git a/app/Jobs/Commands/Finances/UpdateItemPrices.php b/app/Jobs/Commands/Finances/UpdateItemPrices.php index 840573951..ab67d16b7 100644 --- a/app/Jobs/Commands/Finances/UpdateItemPrices.php +++ b/app/Jobs/Commands/Finances/UpdateItemPrices.php @@ -39,6 +39,7 @@ class UpdateItemPrices implements ShouldQueue public function __construct() { $this->connection = 'redis'; + $this->onQueue('default'); } /** diff --git a/app/Jobs/Commands/MiningTaxes/CreateMiningTaxesInvoice.php b/app/Jobs/Commands/MiningTaxes/CreateMiningTaxesInvoice.php index 9854e5924..37e8185ed 100644 --- a/app/Jobs/Commands/MiningTaxes/CreateMiningTaxesInvoice.php +++ b/app/Jobs/Commands/MiningTaxes/CreateMiningTaxesInvoice.php @@ -43,7 +43,8 @@ class CreateMiningTaxesInvoice implements ShouldQueue */ public function __construct() { - // + $this->connection = 'redis'; + $this->onQueue('miningtaxes'); } /** diff --git a/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesLedgers.php b/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesLedgers.php index e1894c570..6a2f2b4c0 100644 --- a/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesLedgers.php +++ b/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesLedgers.php @@ -61,6 +61,7 @@ class FetchMiningTaxesLedgers implements ShouldQueue { //Set the connection for the job $this->connection = 'redis'; + $this->onQueue('miningtaxes'); //Import the variables from the calling function $this->charId = $charId; diff --git a/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesObservers.php b/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesObservers.php index c9708bbce..f1ebee6c3 100644 --- a/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesObservers.php +++ b/app/Jobs/Commands/MiningTaxes/FetchMiningTaxesObservers.php @@ -45,6 +45,7 @@ class FetchMiningTaxesObservers implements ShouldQueue public function __construct() { $this->connection = 'redis'; + $this->onQueue('miningtaxes'); } /** diff --git a/app/Jobs/Commands/MiningTaxes/PreFetchMiningTaxesLedgers.php b/app/Jobs/Commands/MiningTaxes/PreFetchMiningTaxesLedgers.php index 3ce47f23a..1936f9bed 100644 --- a/app/Jobs/Commands/MiningTaxes/PreFetchMiningTaxesLedgers.php +++ b/app/Jobs/Commands/MiningTaxes/PreFetchMiningTaxesLedgers.php @@ -42,6 +42,7 @@ class PreFetchMiningTaxesLedgers implements ShouldQueue public function __construct() { $this->connection = 'redis'; + $this->onQueue('miningtaxes'); } /** diff --git a/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesLedgers.php b/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesLedgers.php index 053fa4c18..df31a0682 100644 --- a/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesLedgers.php +++ b/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesLedgers.php @@ -52,6 +52,7 @@ class ProcessMiningTaxesLedgers implements ShouldQueue { //Set the connection for the job $this->connection = 'redis'; + $this->onQueue('miningtaxes'); //Import variables from the calling function $this->ledger = $ledger; diff --git a/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesPayments.php b/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesPayments.php index 95872a3b9..025af5d1c 100644 --- a/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesPayments.php +++ b/app/Jobs/Commands/MiningTaxes/ProcessMiningTaxesPayments.php @@ -45,6 +45,7 @@ class ProcessMiningTaxesPayments implements ShouldQueue public function __construct() { $this->connection = 'redis'; + $this->onQueue('miningtaxes'); } /** diff --git a/app/Jobs/Commands/MiningTaxes/SendMiningTaxesInvoices.php b/app/Jobs/Commands/MiningTaxes/SendMiningTaxesInvoices.php index c153ec184..281742110 100644 --- a/app/Jobs/Commands/MiningTaxes/SendMiningTaxesInvoices.php +++ b/app/Jobs/Commands/MiningTaxes/SendMiningTaxesInvoices.php @@ -49,7 +49,8 @@ class SendMiningTaxesInvoices implements ShouldQueue */ public function __construct() { - // + $this->connection = 'redis'; + $this->onQueue('miningtaxes'); } /** diff --git a/app/Jobs/Commands/MiningTaxes/SendMiningTaxesInvoicesOld.php b/app/Jobs/Commands/MiningTaxes/SendMiningTaxesInvoicesOld.php index a09c8b9a2..aecff9265 100644 --- a/app/Jobs/Commands/MiningTaxes/SendMiningTaxesInvoicesOld.php +++ b/app/Jobs/Commands/MiningTaxes/SendMiningTaxesInvoicesOld.php @@ -49,6 +49,7 @@ class SendMiningTaxesInvoicesOld implements ShouldQueue public function __construct() { $this->connection = 'redis'; + $this->onQueue('miningtaxes'); } /** diff --git a/app/Jobs/Commands/MiningTaxes/UpdateMiningTaxesLateInvoices15th.php b/app/Jobs/Commands/MiningTaxes/UpdateMiningTaxesLateInvoices15th.php index 7dc4a4f8e..4c97d2931 100644 --- a/app/Jobs/Commands/MiningTaxes/UpdateMiningTaxesLateInvoices15th.php +++ b/app/Jobs/Commands/MiningTaxes/UpdateMiningTaxesLateInvoices15th.php @@ -46,7 +46,8 @@ class UpdateMiningTaxesLateInvoices15th implements ShouldQueue */ public function __construct() { - // + $this->connection = 'redis'; + $this->onQueue('miningtaxes'); } /** diff --git a/app/Jobs/Commands/MiningTaxes/UpdateMiningTaxesLateInvoices1st.php b/app/Jobs/Commands/MiningTaxes/UpdateMiningTaxesLateInvoices1st.php index 06d42582b..4b3c5979b 100644 --- a/app/Jobs/Commands/MiningTaxes/UpdateMiningTaxesLateInvoices1st.php +++ b/app/Jobs/Commands/MiningTaxes/UpdateMiningTaxesLateInvoices1st.php @@ -46,7 +46,8 @@ class UpdateMiningTaxesLateInvoices1st implements ShouldQueue */ public function __construct() { - // + $this->connection = 'redis'; + $this->onQueue('miningtaxes'); } /** diff --git a/app/Jobs/Commands/Structures/ProcessAllianceStructures.php b/app/Jobs/Commands/Structures/ProcessAllianceStructures.php index 450577465..616167831 100644 --- a/app/Jobs/Commands/Structures/ProcessAllianceStructures.php +++ b/app/Jobs/Commands/Structures/ProcessAllianceStructures.php @@ -46,6 +46,7 @@ class ProcessAllianceStructures implements ShouldQueue { //Set the connection for the job $this->connection = 'redis'; + $this->onQueue('structures'); //Set variables $this->structure = $s; diff --git a/app/Jobs/Commands/Structures/PurgeAllianceStructures.php b/app/Jobs/Commands/Structures/PurgeAllianceStructures.php index a4ccc1968..acbf6097c 100644 --- a/app/Jobs/Commands/Structures/PurgeAllianceStructures.php +++ b/app/Jobs/Commands/Structures/PurgeAllianceStructures.php @@ -43,6 +43,7 @@ class PurgeAllianceStructures implements ShouldQueue { //Set the connection for the job $this->connection = 'redis'; + $this->onQueue('structures'); } /**