mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add logging for self update
This commit is contained in:
parent
847c2cce66
commit
e0e3c05e6c
@ -64,10 +64,12 @@ class SelfUpdateController extends BaseController
|
||||
$file_headers = @get_headers($this->getDownloadUrl());
|
||||
|
||||
if(!is_array($file_headers)) {
|
||||
nlog($file_headers);
|
||||
return response()->json(['message' => 'There was a problem reaching the update server, please try again in a little while.'], 410);
|
||||
}
|
||||
|
||||
if (stripos($file_headers[0], "404 Not Found") > 0 || (stripos($file_headers[0], "302 Found") > 0 && stripos($file_headers[7], "404 Not Found") > 0)) {
|
||||
nlog($file_headers);
|
||||
return response()->json(['message' => 'Download not yet available. Please try again shortly.'], 410);
|
||||
}
|
||||
|
||||
|
@ -63,12 +63,12 @@ class AutoBillCron
|
||||
|
||||
nlog($auto_bill_partial_invoices->count().' partial invoices to auto bill');
|
||||
|
||||
$auto_bill_partial_invoices->chunk(400, function ($invoices) {
|
||||
$auto_bill_partial_invoices->chunk(40, function ($invoices) {
|
||||
foreach ($invoices as $invoice) {
|
||||
AutoBill::dispatch($invoice->id, null);
|
||||
}
|
||||
|
||||
sleep(2);
|
||||
sleep(1);
|
||||
});
|
||||
|
||||
$auto_bill_invoices = Invoice::query()
|
||||
@ -85,12 +85,12 @@ class AutoBillCron
|
||||
|
||||
nlog($auto_bill_invoices->count().' full invoices to auto bill');
|
||||
|
||||
$auto_bill_invoices->chunk(400, function ($invoices) {
|
||||
$auto_bill_invoices->chunk(40, function ($invoices) {
|
||||
foreach ($invoices as $invoice) {
|
||||
AutoBill::dispatch($invoice->id, null);
|
||||
}
|
||||
|
||||
sleep(2);
|
||||
sleep(1);
|
||||
});
|
||||
} else {
|
||||
//multiDB environment, need to
|
||||
@ -111,12 +111,12 @@ class AutoBillCron
|
||||
|
||||
nlog($auto_bill_partial_invoices->count()." partial invoices to auto bill db = {$db}");
|
||||
|
||||
$auto_bill_partial_invoices->chunk(400, function ($invoices) use ($db) {
|
||||
$auto_bill_partial_invoices->chunk(40, function ($invoices) use ($db) {
|
||||
foreach ($invoices as $invoice) {
|
||||
AutoBill::dispatch($invoice->id, $db);
|
||||
}
|
||||
|
||||
sleep(2);
|
||||
sleep(1);
|
||||
});
|
||||
|
||||
$auto_bill_invoices = Invoice::query()
|
||||
@ -133,12 +133,12 @@ class AutoBillCron
|
||||
|
||||
nlog($auto_bill_invoices->count()." full invoices to auto bill db = {$db}");
|
||||
|
||||
$auto_bill_invoices->chunk(400, function ($invoices) use ($db) {
|
||||
$auto_bill_invoices->chunk(40, function ($invoices) use ($db) {
|
||||
foreach ($invoices as $invoice) {
|
||||
AutoBill::dispatch($invoice->id, $db);
|
||||
}
|
||||
|
||||
sleep(2);
|
||||
sleep(1);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user