You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Local.php 776 B

3 years ago
12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * 本地调度器 Task_Runner_Local
  4. *
  5. * - 本地内部调度
  6. * - 不能在Api请求时进行此调度
  7. *
  8. * @author dogstar <chanzonghuang@gmail.com> 20150516
  9. */
  10. class Task_Runner_Local extends Task_Runner {
  11. protected function youGo($service, $params) {
  12. $params['service'] = $service;
  13. DI()->request = new PhalApi_Request($params);
  14. DI()->response = new PhalApi_Response_Json();
  15. $phalapi = new PhalApi();
  16. $rs = $phalapi->response();
  17. $apiRs = $rs->getResult();
  18. if ($apiRs['ret'] != 200) {
  19. DI()->logger->debug('task local go fail',
  20. array('servcie' => $service, 'params' => $params, 'rs' => $apiRs));
  21. return FALSE;
  22. }
  23. return TRUE;
  24. }
  25. }