video6
Table of Contents
Functions
- job_manager() : mixed
- here is our buddy the job manager, made to be run as a command an working with "jobs" database as a job pile.
Functions
job_manager()
here is our buddy the job manager, made to be run as a command an working with "jobs" database as a job pile.
job_manager(mixed $argv) : mixed
arguments : -k , key to identify the job -C , callback when command is done -c , the command to execute -t , path to the instance -a , action for the job manager (new, progress or cancel)
exemples :
-
add a job : $job_manager_call='php /home/helphp/utils/job_manager.php -a"new" -t"'.$target.'" -c"'.$cmd.'" -C"'.$callback.'" -k"'.$key.'"';
-
get progress : $job_manager_call='php /home/helphp/utils/job_manager.php -a"progress" -t"'.$target.'" -k"'.$key.'"';
-
cancel : $job_manager_call='php /home/helphp/utils/job_manager.php -a"cancel" -t"'.$target.'" -k"'.$key.'"';
must be followed by : exec($job_manager_call);
Parameters
- $argv : mixed