mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Improve memory handling
This commit is contained in:
parent
dddfd32757
commit
33fdd0000c
@ -112,6 +112,8 @@ class SelfUpdateController extends BaseController
|
|||||||
|
|
||||||
$zipFile->close();
|
$zipFile->close();
|
||||||
|
|
||||||
|
$zipFile = null;
|
||||||
|
|
||||||
nlog('Finished extracting files');
|
nlog('Finished extracting files');
|
||||||
|
|
||||||
unlink($file);
|
unlink($file);
|
||||||
|
@ -129,12 +129,11 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
|
LightLogs::create(new EmailSuccess($this->nmo->company->company_key))
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
|
// nlog('Using ' . ((int) (memory_get_usage(true) / (1024 * 1024))) . 'MB ');
|
||||||
nlog('Using ' . ((int) (memory_get_usage(true) / (1024 * 1024))) . 'MB ');
|
|
||||||
|
|
||||||
$this->nmo = null;
|
$this->nmo = null;
|
||||||
$this->company = null;
|
$this->company = null;
|
||||||
gc_collect_cycles();
|
app('queue.worker')->shouldQuit = 1;
|
||||||
|
|
||||||
} catch (\Exception | \RuntimeException | \Google\Service\Exception $e) {
|
} catch (\Exception | \RuntimeException | \Google\Service\Exception $e) {
|
||||||
|
|
||||||
@ -177,7 +176,7 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
$message = null;
|
$message = null;
|
||||||
$this->nmo = null;
|
$this->nmo = null;
|
||||||
$this->company = null;
|
$this->company = null;
|
||||||
gc_collect_cycles();
|
app('queue.worker')->shouldQuit = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -204,7 +203,7 @@ class NinjaMailerJob implements ShouldQueue
|
|||||||
|
|
||||||
if ($this->nmo->to_user instanceof ClientContact)
|
if ($this->nmo->to_user instanceof ClientContact)
|
||||||
$this->logMailError($message, $this->nmo->to_user->client);
|
$this->logMailError($message, $this->nmo->to_user->client);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function setMailDriver()
|
private function setMailDriver()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user