collector-reload.php 829 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. */
  11. ini_set('display_errors', 'on');
  12. ini_set('display_startup_errors', 'on');
  13. error_reporting(E_ALL);
  14. date_default_timezone_set('Asia/Shanghai');
  15. $basePath = getcwd();
  16. $dir = dirname(__DIR__, 3);
  17. if (file_exists($dir . '/vendor/autoload.php')) {
  18. $basePath = $dir;
  19. }
  20. ! defined('SWOOLE_HOOK_ALL') && define('SWOOLE_HOOK_ALL', 0);
  21. ! defined('BASE_PATH') && define('BASE_PATH', $basePath);
  22. ! defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
  23. require BASE_PATH . '/vendor/autoload.php';
  24. use Hyperf\Watcher\Process;
  25. $process = new Process($argv[1]);
  26. $process();