Don't blow up if Redis switches to READONLY

This commit is contained in:
Robin Ward
2015-04-24 13:10:43 -04:00
parent 8129cce104
commit 5b3f99aa50
56 changed files with 194 additions and 147 deletions

View File

@ -66,7 +66,7 @@ after_initialize do
post.custom_fields["#{VOTES_CUSTOM_FIELD}-#{user_id}"] = votes
post.save_custom_fields
MessageBus.publish("/polls/#{post_id}", { poll: poll })
DiscourseBus.publish("/polls/#{post_id}", { poll: poll })
render json: { poll: poll, vote: options }
end
@ -100,7 +100,7 @@ after_initialize do
post.custom_fields[POLLS_CUSTOM_FIELD] = polls
post.save_custom_fields
MessageBus.publish("/polls/#{post_id}", { poll: polls[poll_name] })
DiscourseBus.publish("/polls/#{post_id}", { poll: polls[poll_name] })
render json: { poll: polls[poll_name] }
end