The version of vichan running on lainchan.org
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

32 Zeilen
802B

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