Skip to content

Commit

Permalink
increased max execution to process large generations of certs
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardhanna committed Nov 26, 2024
1 parent bb27935 commit 4f6a521
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/CertificateParticipation.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ class CertificateParticipation

public function __construct($name_for_certificate, $event_name, $event_date)
{
ini_set('max_execution_time', 300); // Set max execution time to 300 seconds
ini_set('max_execution_time', 600); // Set max execution time to 600 seconds
ini_set('memory_limit', '512M'); // Set memory limit to 512 MB (adjust as needed)

$this->name_of_certificate_holder = $name_for_certificate;
$this->event_name = $event_name;
$this->event_date = $event_date;
Expand Down Expand Up @@ -127,7 +129,7 @@ protected function run_pdf_creation(): void
. escapeshellarg($this->resource_path . '/' . $this->personalized_template_name . '.tex');

$process = Process::fromShellCommandline($command, $this->resource_path);
$process->setTimeout(600); // Set 600 seconds timeout
$process->setTimeout(600); // Allow up to 600 seconds for execution
$this->execute_process($process);

if (!$process->isSuccessful()) {
Expand Down

0 comments on commit 4f6a521

Please sign in to comment.