mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
bump sleep for failed sends
This commit is contained in:
parent
28a2695ef8
commit
edf5947316
@ -110,7 +110,9 @@ class DemoMode extends Command
|
||||
|
||||
$this->info('Creating Small Account and Company');
|
||||
|
||||
$account = Account::factory()->create();
|
||||
$account = Account::factory()->create([
|
||||
"set_react_as_default_ap" => 0,
|
||||
]);
|
||||
$company = Company::factory()->create([
|
||||
'account_id' => $account->id,
|
||||
'slack_webhook_url' => config('ninja.notification.slack'),
|
||||
|
@ -223,7 +223,7 @@ class NinjaMailerJob implements ShouldQueue
|
||||
}
|
||||
|
||||
/* Releasing immediately does not add in the backoff */
|
||||
sleep(rand(0, 3));
|
||||
sleep(rand(5, 10));
|
||||
|
||||
$this->release($this->backoff()[$this->attempts() - 1]);
|
||||
}
|
||||
|
@ -150,19 +150,19 @@ class AutoBillInvoice extends AbstractService
|
||||
->setPaymentHash($payment_hash)
|
||||
->tokenBilling($gateway_token, $payment_hash);
|
||||
} catch (\Exception $e) {
|
||||
|
||||
nlog('payment NOT captured for '.$this->invoice->number.' with error '.$e->getMessage());
|
||||
}
|
||||
|
||||
$this->invoice->auto_bill_tries += 1;
|
||||
|
||||
if ($this->invoice->auto_bill_tries == 3) {
|
||||
$this->invoice->auto_bill_enabled = false;
|
||||
$this->invoice->auto_bill_tries = 0; //reset the counter here in case auto billing is turned on again in the future.
|
||||
$this->invoice->save();
|
||||
}
|
||||
|
||||
$this->invoice->save();
|
||||
|
||||
nlog('payment NOT captured for '.$this->invoice->number.' with error '.$e->getMessage());
|
||||
}
|
||||
|
||||
if ($payment) {
|
||||
info('Auto Bill payment captured for '.$this->invoice->number);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user