* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-define('INSTALLDIR', realpath(dirname(__FILE__) . '/..'));
+define('INSTALLDIR', dirname(__DIR__));
+define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public');
$shortoptions = 'fi:at:';
$longoptions = array('id=', 'foreground', 'all', 'threads=');
} else if (have_option('--threads')) {
$threads = intval(get_option_value('--threads'));
} else {
- $threads = 0;
+ //If there is no argument for number of threads
+ //Try reading a config option for the number
+ $threads = common_config('queue','threads');
}
if (!$threads) {
$threads = getProcessorCount();
}
+common_log(LOG_INFO, sprintf('Launching QueueDaemon background process with %1$d threads.', $threads));
+
$daemonize = !(have_option('f') || have_option('--foreground'));
$all = have_option('a') || have_option('--all');