Added config file override for worker script

This commit is contained in:
2011-08-05 19:35:55 +01:00
parent efb7db35d8
commit dbc1252bef

View File

@@ -2,7 +2,17 @@
define('HBC_File', 'worker'); define('HBC_File', 'worker');
require_once '/etc/ripping-cluster/config.php'; $options = array();
if (isset($_SERVER['argv'])) {
$options = getopt('c:', array('config:'));
}
if (isset($options['config'])) {
require_once $options['config'];
} else {
require_once '/etc/ripping-cluster/config.php';
}
require_once(SihnonFramework_Lib . 'SihnonFramework/Main.class.php'); require_once(SihnonFramework_Lib . 'SihnonFramework/Main.class.php');
require_once 'Net/Gearman/Worker.php'; require_once 'Net/Gearman/Worker.php';