// +---------------------------------------------------------------------- namespace think\queue\job; use think\App; use think\queue\Job; class Sync extends Job { /** * The queue message data. * * @var string */ protected $job; public function __construct(App $app, $job, $connection, $queue) { $this->app = $app; $this->connection = $connection; $this->queue = $queue; $this->job = $job; } /** * Get the number of times the job has been attempted. * @return int */ public function attempts() { return 1; } /** * Get the raw body string for the job. * @return string */ public function getRawBody() { return $this->job; } /** * Get the job identifier. * * @return string */ public function getJobId() { return ''; } public function getQueue() { return 'sync'; } }