Skip to content

Commit 7eb15fe

Browse files
authored
Merge pull request #18091 from uberbrady/fix_backup_durations
Moved import time limit inside class, added new backup time limit
2 parents 324bc49 + 4b7a067 commit 7eb15fe

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

app/Console/Commands/ObjectImportCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
use Illuminate\Support\Facades\Log;
99
use Symfony\Component\Console\Helper\ProgressIndicator;
1010

11-
ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); //600 seconds = 10 minutes
12-
ini_set('memory_limit', env('IMPORT_MEMORY_LIMIT', '500M'));
1311

1412
/**
1513
* Class ObjectImportCommand
@@ -52,6 +50,9 @@ public function __construct()
5250
*/
5351
public function handle()
5452
{
53+
ini_set('max_execution_time', env('IMPORT_TIME_LIMIT', 600)); //600 seconds = 10 minutes
54+
ini_set('memory_limit', env('IMPORT_MEMORY_LIMIT', '500M'));
55+
5556
$this->progressIndicator = new ProgressIndicator($this->output);
5657

5758
$filename = $this->argument('filename');

app/Console/Commands/SystemBackup.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public function __construct()
3737
*/
3838
public function handle()
3939
{
40+
ini_set('max_execution_time', env('BACKUP_TIME_LIMIT', 600)); //600 seconds = 10 minutes
41+
4042
if ($this->option('filename')) {
4143
$filename = $this->option('filename');
4244

0 commit comments

Comments
 (0)