Update URL generator heuristic

pull/1339/head
Rick Carlino 2019-07-26 14:34:29 -05:00
parent 7d4ea8104f
commit d0cc254884
2 changed files with 3 additions and 3 deletions

View File

@ -9,8 +9,8 @@ module Api
attr_reader :cache
CACHE_KEY_TPL = "mqtt_limiter:%s"
TTL = 60 * 5 # Ten Minutes
PER_DEVICE_MAX = 10
TTL = 60 * 5 # Five Minutes
PER_DEVICE_MAX = 20
MAX_GUEST_COUNT = 256
WARNING = "'%s' was rate limited."

View File

@ -79,7 +79,7 @@ class Image < ApplicationRecord
def regular_url
if BUCKET
# Not sure why. TODO: Investigate why Rails URL helpers don't work here.
"https://storage.cloud.google.com/#{BUCKET}/#{attachment.key}"
"https://storage.googleapis.com/#{BUCKET}/#{attachment.key}"
else
Rails
.application