mirror of https://github.com/MISP/MISP
chg: [sync] Enable garbage collector when pulling events from remote server
parent
a322217cbd
commit
e2dbc690ac
|
@ -145,6 +145,10 @@ class ServerShell extends AppShell
|
||||||
if (!empty($this->args[4]) && $this->args[4] === 'force') {
|
if (!empty($this->args[4]) && $this->args[4] === 'force') {
|
||||||
$force = true;
|
$force = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Try to enable garbage collector as pulling events can use a lot of memory
|
||||||
|
gc_enable();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$result = $this->Server->pull($user, $technique, $server, $jobId, $force);
|
$result = $this->Server->pull($user, $technique, $server, $jobId, $force);
|
||||||
if (is_array($result)) {
|
if (is_array($result)) {
|
||||||
|
|
Loading…
Reference in New Issue