如何在php中使用python修复执行长进程

I am trying to run a python script that acts like a make file using PHP, the problem is the python script will take up to 1 minute to finalize and at the end it will output (Complete). The when i run it using php it takes few seconds and outputs the complete string from the python script. something is breaking the process and i don't know what.

            $default = ini_get('max_execution_time');
            set_time_limit(0);
            ini_set('max_execution_time',2*60);
            ignore_user_abort();
            echo shell_exec('python3 make.py /var/www/html/files'); 
            set_time_limit($default);   

Expected result must be Completed after the long process.

Actual result: few seconds and i get Completed.

Python script works fine fully tested.