@@ -47,6 +47,7 @@ public function __construct(
4747 public function push ($ job , $ data = '' , $ queue = null )
4848 {
4949 $ payload = $ this ->createPayload ($ job , $ data );
50+
5051 return $ this ->pushToBatch ($ queue , $ payload , $ this ->getBatchDisplayName ($ job ));
5152 }
5253
@@ -65,7 +66,7 @@ protected function getBatchDisplayName($job)
6566 {
6667 if (is_object ($ job )) {
6768 return method_exists ($ job , 'displayName ' )
68- ? $ job ->displayName () : str_replace ('\\' , '_ ' , (string )get_class ($ job ));
69+ ? $ job ->displayName () : str_replace ('\\' , '_ ' , (string ) get_class ($ job ));
6970 } else {
7071 return is_string ($ job ) ? explode ('@ ' , $ job )[0 ] : null ;
7172 }
@@ -74,10 +75,9 @@ protected function getBatchDisplayName($job)
7475 /**
7576 * Push a raw payload to the database, then to AWS Batch, with a given delay.
7677 *
77- * @param string|null $queue
78- * @param string $payload
79- * @param string $jobName
80- *
78+ * @param string|null $queue
79+ * @param string $payload
80+ * @param string $jobName
8181 * @return int
8282 */
8383 protected function pushToBatch ($ queue , $ payload , $ jobName )
@@ -86,11 +86,11 @@ protected function pushToBatch($queue, $payload, $jobName)
8686
8787 $ this ->batch ->submitJob ([
8888 'jobDefinition ' => $ this ->jobDefinition ,
89- 'jobName ' => $ jobName ,
90- 'jobQueue ' => $ this ->getQueue ($ queue ),
91- 'parameters ' => [
89+ 'jobName ' => $ jobName ,
90+ 'jobQueue ' => $ this ->getQueue ($ queue ),
91+ 'parameters ' => [
9292 'jobId ' => $ jobId ,
93- ]
93+ ],
9494 ]);
9595
9696 return $ jobId ;
@@ -105,7 +105,6 @@ public function getJobById($id)
105105 ->where ('id ' , $ id )
106106 ->first ();
107107
108-
109108 if (!isset ($ job )) {
110109 throw new JobNotFoundException ('Could not find the job ' );
111110 }
@@ -133,11 +132,11 @@ protected function marshalJob($queue, $job)
133132 /**
134133 * Release the job, without deleting first from the Queue
135134 *
136- * @param string $queue
137- * @param \StdClass $job
138- * @param int $delay
139- *
135+ * @param string $queue
136+ * @param \StdClass $job
137+ * @param int $delay
140138 * @return int
139+ *
141140 * @throws UnsupportedException
142141 */
143142 public function release ($ queue , $ job , $ delay )
@@ -147,8 +146,8 @@ public function release($queue, $job, $delay)
147146 }
148147
149148 return $ this ->database ->table ($ this ->table )->where ('id ' , $ job ->id )->update ([
150- 'attempts ' => $ job ->attempts ,
151- 'reserved_at ' => null
149+ 'attempts ' => $ job ->attempts ,
150+ 'reserved_at ' => null ,
152151 ]);
153152 }
154153
0 commit comments