lib/sidekiq/deploy.rb
Ruby subshell command execution
SHA-256f3d4dc6b0240698eff8c943e3927594b8d4152bfa3dfba5751c8c59b171f5773
MaleculeH(Po)
Evidence
1require "sidekiq/redis_connection"
2require "time"
3
4# This file is designed to be required within the user's
5# deployment script; it should need a bare minimum of dependencies.
6# Usage:
7#
8# requi …
17:10… TTL = 90 * 24 * 60 * 60 # 90 days
18
19 LABEL_MAKER = -> {
20 `git log -1 --format="%h %s"`.strip
21 }
22
⋯5 lines
32:28… .call
33 # we need to round the timestamp so that we gracefully
34 # handle an very common error in marking deploys:
35 # having every process mark its deploy, leading
36 # to N marks for each deploy. Instead we round the time
37 # to the minute so that multple marks within that …
42:26… marks"
43 stamp = floor.iso8601
44
45 @pool.with do |c|
46 # only allow one deploy mark for a given label for the next minute
47 lock …