Skip to content

Commit

Permalink
explicitly disallow upstash replicas if no upstash regions provided
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromegn committed Oct 30, 2024
1 parent 9ada865 commit c270001
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,10 @@
cmd += " --disable-eviction"
end

if (regions = UPSTASH["regions"])
if (regions = UPSTASH["regions"]) && !regions.empty?
cmd += " --replica-regions #{regions.join(",")}"
else
cmd += " --no-replicas"
end

artifact Artifact::UPSTASH_REDIS, { config: UPSTASH, region: APP_REGION, name: db_name }
Expand Down

0 comments on commit c270001

Please sign in to comment.