CJobObject.Class.php 724 B

12345678910111213141516171819202122
  1. <?php
  2. namespace Jobs\Controller;
  3. class CJobObject
  4. {
  5. public $uuid =''; //job uuid
  6. public $topic =''; //job 队列名
  7. public $jobClass =''; //job 执行类
  8. public $jobMethod =''; //job 执行方法
  9. public $jobParams =[]; //job参数
  10. public $jobExtras =[]; //附件信息,delay/expiration/priority等
  11. public function __construct( $topic, $jobClass, $jobMethod, array $jobParams=[], array $jobExtras=[])
  12. {
  13. $this->uuid =uniqid($topic) . '.' . microtime(true);
  14. $this->topic =$topic;
  15. $this->jobClass =$jobClass;
  16. $this->jobMethod =$jobMethod;
  17. $this->jobParams =$jobParams;
  18. $this->jobExtras =$jobExtras;
  19. }
  20. }