I am running a perl script on a tom cat 6.0 server on top of Windows 2008 R2 to pull from the repository. The script becomes very slow because it has to wait for git to complete. This creates a maintenance time for the Github website, which actually runs the script. There is nothing in the code except the next line.
exec("C:\\Git\\bin\\git.exe pull") ;
How can I improve the script so that the webhook starts working. The following is the error I am getting on the github website.
We were unable to deliver this payload: Service timeout
When I run the script in the browser, it takes about 50 seconds over 1 minute. Is the cat cat overloaded?
---- Update after using fork ----- I used the following code to implement it through fork. It works locally (when executed on the command line), but when I launch through the web server, I get a positive signal to the webhook, but the changes are not executed, which means that server_script did not start.
$pid = fork(); if( $pid == 0 ){ exec("perl server_script.pl"); print "This is child process\n"; print "Child process is existing\n"; exit 0; } print "This is parent process and child ID is $pid\n"; print "Parent process is existing\n"; exit 0;
source share