Added class to handle running tasks in the background
This commit is contained in:
17
HandBrakeCluster/BackgroundTask.class.php
Normal file
17
HandBrakeCluster/BackgroundTask.class.php
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class HandBrakeCluster_BackgroundTask {
|
||||||
|
|
||||||
|
protected function __construct() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function run($command) {
|
||||||
|
$pipes = array();
|
||||||
|
$pid = proc_open($command . ' &', array(), $pipes);
|
||||||
|
proc_close($pid);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
?>
|
||||||
Reference in New Issue
Block a user