DEV: uses Discourse.redis instead of $redis

This commit is contained in:
Joffrey JAFFEUX 2019-12-03 10:49:58 +01:00
parent 96abbd9c19
commit 15bc64bbc9
1 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ after_initialize do
# we got to do a one time upgrade
if !skip_db && defined?(UserAction::SOLVED)
unless $redis.get('solved_already_upgraded')
unless Discourse.redis.get('solved_already_upgraded')
unless UserAction.where(action_type: UserAction::SOLVED).exists?
Rails.logger.info("Upgrading storage for solved")
sql = <<SQL
@ -61,7 +61,7 @@ SQL
DB.exec(sql, solved: UserAction::SOLVED)
end
$redis.set("solved_already_upgraded", "true")
Discourse.redis.set("solved_already_upgraded", "true")
end
end