#794: refactoring of constants

This commit is contained in:
Vokhmin Alexey V 2013-01-18 01:01:53 +04:00
parent f522ceec3c
commit 4e213d77af
1 changed files with 8 additions and 9 deletions

View File

@ -3,15 +3,14 @@ module AbfWorker
class BuildListsPublishTaskManager
REDIS_MAIN_KEY = 'abf-worker::build-lists-publish-task-manager::'
RESIGN_REPOSITORIES = "#{REDIS_MAIN_KEY}resign-repositories"
PROJECTS_FOR_CLEANUP = "#{REDIS_MAIN_KEY}projects-for-cleanup"
LOCKED_PROJECTS_FOR_CLEANUP = "#{REDIS_MAIN_KEY}locked-projects-for-cleanup"
LOCKED_REPOSITORIES = "#{REDIS_MAIN_KEY}locked-repositories"
LOCKED_REP_AND_PLATFORMS = "#{REDIS_MAIN_KEY}locked-repositories-and-platforms"
LOCKED_BUILD_LISTS = "#{REDIS_MAIN_KEY}locked-build-lists"
%w(RESIGN_REPOSITORIES
PROJECTS_FOR_CLEANUP
LOCKED_PROJECTS_FOR_CLEANUP
LOCKED_REPOSITORIES
LOCKED_REP_AND_PLATFORMS
LOCKED_BUILD_LISTS).each do |kind|
const_set kind, "#{REDIS_MAIN_KEY}#{kind.downcase.gsub('_', '-')}"
end
def initialize
@redis = self.redis