Skip to content

Commit 53c168f

Browse files
committed
Add check to job_ids and version bump
1 parent dc612d9 commit 53c168f

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/Config/eveapi.config.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
return [
2323

24-
'version' => '1.0.2',
24+
'version' => '1.0.3',
2525

2626
// PhealNG Specific Configuration
2727
'pheal' => [

src/Traits/JobManager.php

+10
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ public function addUniqueJob($job, JobContainer $args)
6060
$new_job = (new $job($args))->onQueue($args->queue);
6161
$job_id = $this->dispatch($new_job);
6262

63+
// Check that the id we got back is a random
64+
// string and not 0. In fact, normal job_ids
65+
// are like a 32char string, so just check that
66+
// its more than 2. If its not, we can assume
67+
// the job itself was not sucesfully added.
68+
// If it actually is queued, it will get discarded
69+
// when trackOrDismiss() is called.
70+
if(strlen($job_id) < 2)
71+
return;
72+
6373
// ...and add tracking information
6474
JobTracking::create([
6575
'job_id' => $job_id,

0 commit comments

Comments
 (0)