Sha256: 164a166942b9d742827785314f73d102b28a3d58785fa04b5b4d01dedef0cd4b
Contents?: true
Size: 594 Bytes
Versions: 16
Compression:
Stored size: 594 Bytes
Contents
require 'test_helper' class UniqueJobTest < ActiveSupport::TestCase test "the lock key contains the job type" do task = tasks(:shipit_restart) job_a = ChunkRollupJob.new(task) job_b = GithubSyncJob.new(task) called = false job_a.acquire_lock do job_b.acquire_lock do called = true end end assert called end test "the lock key is serialized" do task = tasks(:shipit_restart) job = ChunkRollupJob.new(task) assert_equal %(ChunkRollupJob-{"_aj_globalid"=>"gid://shipit/Task/#{task.id}"}), job.lock_key(*job.arguments) end end
Version data entries
16 entries across 16 versions & 1 rubygems