diff --git a/src/invidious/helpers/redis_tokens.cr b/src/invidious/helpers/redis_tokens.cr index 7c0970e7..9650ecf9 100644 --- a/src/invidious/helpers/redis_tokens.cr +++ b/src/invidious/helpers/redis_tokens.cr @@ -6,9 +6,14 @@ module Tokens def refresh_tokens @@po_token = REDIS_DB.get("invidious:po_token") @@visitor_data = REDIS_DB.get("invidious:visitor_data") - LOGGER.debug("RefreshTokens: Tokens are:") - LOGGER.debug("RefreshTokens: po_token: #{@@po_token}") - LOGGER.debug("RefreshTokens: visitor_data: #{@@visitor_data}") + if !@@po_token.nil? && !@@visitor_data.nil? + LOGGER.debug("RefreshTokens: Successfully updated tokens") + else + LOGGER.warn("RefreshTokens: Tokens are empty!") + end + LOGGER.trace("RefreshTokens: Tokens are:") + LOGGER.trace("RefreshTokens: po_token: #{@@po_token}") + LOGGER.trace("RefreshTokens: visitor_data: #{@@visitor_data}") end def get_tokens