Skip to content

Commit

Permalink
Revert "[10.x] Added colon to UniqueLock key (#47142)" (#47159)
Browse files Browse the repository at this point in the history
This reverts commit 746a49e.
  • Loading branch information
taylorotwell authored May 22, 2023
1 parent 746a49e commit fa4e0f1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Bus/UniqueLock.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ protected function getKey($job)
? $job->uniqueId()
: ($job->uniqueId ?? '');

return 'laravel_unique_job:'.get_class($job).':'.$uniqueId;
return 'laravel_unique_job:'.get_class($job).$uniqueId;
}
}
2 changes: 1 addition & 1 deletion tests/Integration/Broadcasting/BroadcastManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function testUniqueEventsCanBeBroadcast()
Bus::assertNotDispatched(UniqueBroadcastEvent::class);
Queue::assertPushed(UniqueBroadcastEvent::class);

$lockKey = 'laravel_unique_job:'.UniqueBroadcastEvent::class.':'.TestEventUnique::class;
$lockKey = 'laravel_unique_job:'.UniqueBroadcastEvent::class.TestEventUnique::class;
$this->assertFalse($this->app->get(Cache::class)->lock($lockKey, 10)->get());
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Queue/JobDispatchingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function testUniqueJobLockIsReleasedForJobDispatchedAfterResponse()
*/
private function getJobLock($job, $value = null)
{
return $this->app->get(Repository::class)->lock('laravel_unique_job:'.$job.':'.$value, 10)->get();
return $this->app->get(Repository::class)->lock('laravel_unique_job:'.$job.$value, 10)->get();
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/Queue/UniqueJobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function testLockCanBeReleasedBeforeProcessing()

protected function getLockKey($job)
{
return 'laravel_unique_job:'.(is_string($job) ? $job : get_class($job)).':';
return 'laravel_unique_job:'.(is_string($job) ? $job : get_class($job));
}
}

Expand Down

0 comments on commit fa4e0f1

Please sign in to comment.