mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
changes to job-schedule
This commit is contained in:
parent
2206d2190a
commit
f8d0186f2f
@ -97,6 +97,9 @@ class Kernel extends ConsoleKernel
|
|||||||
/* Fires webhooks for overdue Invoice */
|
/* Fires webhooks for overdue Invoice */
|
||||||
$schedule->job(new InvoiceCheckLateWebhook)->dailyAt('07:00')->withoutOverlapping()->name('invoice-overdue-job')->onOneServer();
|
$schedule->job(new InvoiceCheckLateWebhook)->dailyAt('07:00')->withoutOverlapping()->name('invoice-overdue-job')->onOneServer();
|
||||||
|
|
||||||
|
/* Pulls in bank transactions from third party services */
|
||||||
|
$schedule->job(new BankTransactionSync)->everyFourHours()->withoutOverlapping()->name('bank-trans-sync-job')->onOneServer();
|
||||||
|
|
||||||
if (Ninja::isSelfHost()) {
|
if (Ninja::isSelfHost()) {
|
||||||
$schedule->call(function () {
|
$schedule->call(function () {
|
||||||
Account::whereNotNull('id')->update(['is_scheduler_running' => true]);
|
Account::whereNotNull('id')->update(['is_scheduler_running' => true]);
|
||||||
@ -107,9 +110,6 @@ class Kernel extends ConsoleKernel
|
|||||||
if (Ninja::isHosted()) {
|
if (Ninja::isHosted()) {
|
||||||
$schedule->job(new AdjustEmailQuota)->dailyAt('23:30')->withoutOverlapping();
|
$schedule->job(new AdjustEmailQuota)->dailyAt('23:30')->withoutOverlapping();
|
||||||
|
|
||||||
/* Pulls in bank transactions from third party services */
|
|
||||||
$schedule->job(new BankTransactionSync)->everyFourHours()->withoutOverlapping()->name('bank-trans-sync-job')->onOneServer();
|
|
||||||
|
|
||||||
/* Checks ACH verification status and updates state to authorize when verified */
|
/* Checks ACH verification status and updates state to authorize when verified */
|
||||||
$schedule->job(new CheckACHStatus)->everySixHours()->withoutOverlapping()->name('ach-status-job')->onOneServer();
|
$schedule->job(new CheckACHStatus)->everySixHours()->withoutOverlapping()->name('ach-status-job')->onOneServer();
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ class Kernel extends ConsoleKernel
|
|||||||
$schedule->command('ninja:s3-cleanup')->dailyAt('23:15')->withoutOverlapping()->name('s3-cleanup-job')->onOneServer();
|
$schedule->command('ninja:s3-cleanup')->dailyAt('23:15')->withoutOverlapping()->name('s3-cleanup-job')->onOneServer();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config('queue.default') == 'database' && Ninja::isSelfHost() && config('ninja.internal_queue_enabled') && ! config('ninja.is_docker')) {
|
if (config('queue.default') == 'database' && Ninja::isSelfHost() && config('ninja.internal_queue_enabled') && !config('ninja.is_docker')) {
|
||||||
$schedule->command('queue:work database --stop-when-empty --memory=256')->everyMinute()->withoutOverlapping();
|
$schedule->command('queue:work database --stop-when-empty --memory=256')->everyMinute()->withoutOverlapping();
|
||||||
|
|
||||||
$schedule->command('queue:restart')->everyFiveMinutes()->withoutOverlapping();
|
$schedule->command('queue:restart')->everyFiveMinutes()->withoutOverlapping();
|
||||||
@ -134,7 +134,7 @@ class Kernel extends ConsoleKernel
|
|||||||
*/
|
*/
|
||||||
protected function commands()
|
protected function commands()
|
||||||
{
|
{
|
||||||
$this->load(__DIR__.'/Commands');
|
$this->load(__DIR__ . '/Commands');
|
||||||
|
|
||||||
require base_path('routes/console.php');
|
require base_path('routes/console.php');
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@ class BankTransactionSync implements ShouldQueue
|
|||||||
foreach (MultiDB::$dbs as $db) {
|
foreach (MultiDB::$dbs as $db) {
|
||||||
MultiDB::setDB($db);
|
MultiDB::setDB($db);
|
||||||
|
|
||||||
|
if (Ninja::isSelfHost()) { // @turbo124 @todo I migrated the schedule for the job within the kernel to execute on all platforms and use the same expression here to determine if yodlee can run or not. Please chek/verify
|
||||||
nlog("syncing transactions - yodlee");
|
nlog("syncing transactions - yodlee");
|
||||||
|
|
||||||
$a = Account::with('bank_integrations')->whereNotNull('bank_integration_yodlee_account_id')->cursor()->each(function ($account) {
|
$a = Account::with('bank_integrations')->whereNotNull('bank_integration_yodlee_account_id')->cursor()->each(function ($account) {
|
||||||
@ -60,6 +61,7 @@ class BankTransactionSync implements ShouldQueue
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
nlog("syncing transactions - nordigen");
|
nlog("syncing transactions - nordigen");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user