process.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * This file is part of webman.
  4. *
  5. * Licensed under The MIT License
  6. * For full copyright and license information, please see the MIT-LICENSE.txt
  7. * Redistributions of files must retain the above copyright notice.
  8. *
  9. * @author walkor<walkor@workerman.net>
  10. * @copyright walkor<walkor@workerman.net>
  11. * @link http://www.workerman.net/
  12. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  13. */
  14. global $argv;
  15. return [
  16. // File update detection and automatic reload
  17. 'monitor' => [
  18. 'handler' => process\Monitor::class,
  19. 'reloadable' => false,
  20. 'constructor' => [
  21. // Monitor these directories
  22. 'monitorDir' => array_merge([
  23. app_path(),
  24. config_path(),
  25. base_path() . '/process',
  26. base_path() . '/support',
  27. base_path() . '/resource',
  28. base_path() . '/.env',
  29. ], glob(base_path() . '/plugin/*/app'), glob(base_path() . '/plugin/*/config'), glob(base_path() . '/plugin/*/api')),
  30. // Files with these suffixes will be monitored
  31. 'monitorExtensions' => [
  32. 'php', 'html', 'htm', 'env'
  33. ],
  34. 'options' => [
  35. 'enable_file_monitor' => !in_array('-d', $argv) && DIRECTORY_SEPARATOR === '/',
  36. 'enable_memory_monitor' => DIRECTORY_SEPARATOR === '/',
  37. ]
  38. ]
  39. ],
  40. /**产品分红*/
  41. 'task' => [
  42. 'handler' => process\Task::class
  43. ],
  44. /**基金分红*/
  45. 'signTask' => [
  46. 'handler' => process\SignTask::class
  47. ],
  48. // /** 每天自动分红 */
  49. // 'taskFj' => [
  50. // 'handler' => process\TaskFj::class
  51. // ],
  52. /**矿机产生*/
  53. 'taskRestart' => [
  54. 'handler' => process\TaskRestart::class
  55. ],
  56. ];