Skip to content

Commit f574577

Browse files
authored
Merge pull request #2962 from zendesk/jylee/cache
make docker build service lock expire after 10 seconds and not 5 min …
2 parents 0a08d59 + d618eca commit f574577

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/models/docker_builder_service.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ def run(tag_as_latest: false)
4343
private
4444

4545
# In development, memcache can be down and we don't want that to stop builds
46+
# Note: we need raw: true because of https://github.com/rails/rails/pull/34026
4647
def same_build_in_progress?
4748
!Rails.env.development? &&
48-
!Rails.cache.write("build-service-#{@build.id}", true, unless_exist: true, expires_in: 10.seconds)
49+
!Rails.cache.write("build-service-#{@build.id}", true, unless_exist: true, expires_in: 10.seconds, raw: true)
4950
end
5051

5152
def execute_build_command(tmp_dir, command)

0 commit comments

Comments
 (0)