improve scoring to store to presubmitted localhost, fix style and
[ViQa-Kissu.git] / tools / worker.php
blobe19fe1c6df4aae01b1c14bf073e9e9832544b975
1 #!/usr/bin/php
2 <?php
3 /* worker.php - part of advanced build vichan feature */
5 require dirname(__FILE__) . '/inc/cli.php';
6 require_once 'inc/controller.php';
8 $config['smart_build'] = false; // Let's disable it, so we can build the page for real
9 $config['generation_strategies'] = array('strategy_immediate');
11 function after_open_board() { global $config;
12 $config['smart_build'] = false;
13 $config['generation_strategies'] = array('strategy_immediate');
16 echo "Hello world!\n";
18 $queue = get_queue('generate');
20 while (true) {
21 $q = $queue->pop(2);
22 foreach ($q as $v) {
23 list($__, $func, $ary, $action) = unserialize($v);
24 echo "Starting to generate $func ".implode(" ", $ary)."... ";
26 call_user_func_array($func, $ary);
28 echo "done!\n";
30 if (!$q) usleep(20000); // 0.02s