def __init__(self): # Make sure that configuration is created only once if Configuration._instance: raise SingletonExistsException("Singleton violation") self.config_parser = None # Specify, where trac configuration file is. self.defaults() self.refresh() # DEPRECATED: Use env.abs_href instead # Your server's url: 'http://some.server.com' self.url_service = self.default_http_scheme + '://' + self.domain_name # DEPRECATED: Use ref.href instead # Path to home page '/trac/home' self.url_home_path = self.url_projects_path + "/" + self.sys_home_project_name # For projects: self.url_projects_path (configurable) # Your server's url with project path: 'http://some.server.com/trac' # DEPRECATED: Use req.abs_href instead self.url_projects = self.url_service + self.url_projects_path # Full home project url 'http://some.server.com/trac/home' # DEPRECATED: Use env.href instead self.url_home = self.url_service + self.url_home_path # Statistics url # DEPRECATED: Use env.abs_href instead self.url_statistics = self.statistics_scheme + '://' + self.domain_name + '/' + self.sys_home_project_name + '/stats' self.start_log()
def __init__(self): if GroupPermissionCache.__instance: raise SingletonExistsException() self.mc = conf.getMemcachedInstance() # Cache times are seconds self.ID_CACHE_TIME = 15 * 60 self.PERMISSION_CACHE_TIME = 5 * 60
def __init__(self): if MigrateMgr.__instance: raise SingletonExistsException('Singleton Error') self.printout = lambda msg, title=None: printer(msg, title) self.printerr = lambda msg, title=None: printer(msg, title, 'error') self.printwarn = lambda msg, title=None: printer(msg, title, 'warning') self.printok = lambda msg, title=None: printer(msg, title, 'success') self.__migrations = {}
def __init__(self): if CQDEAuthenticationStore._instance: raise SingletonExistsException( "Use CQDEAuthenticationStore.instance()") self.__cache = GroupPermissionCache.instance() # Consider for not hardcoding this self.LOCAL = 'LocalDB' # self.LDAP also hardcoded in ldap_auth.py self.LDAP = 'LDAP'
def __init__(self): if CQDELdapGroupStore._instance: raise SingletonExistsException("Use CQDELdapGroupStore.instance()") self.__cache = GroupPermissionCache.instance()
def __init__(self): if AuthenticationCache.__instance: raise SingletonExistsException() self.mc = conf.getMemcachedInstance() self.AUTHENTICATION_CACHE_TIME = 60
def __init__(self): if UserCache.__instance: raise SingletonExistsException() self.mc = conf.getMemcachedInstance() self.USER_CACHE_TIME = 5 * 60
def __init__(self): if CQDESshKeyStore.__instance: raise SingletonExistsException("Use CQDESshKeyStore.instance()")
def __init__(self): if EventCache.__instance: raise SingletonExistsException() self.mc = conf.getMemcachedInstance() self.EVENT_CACHE_TIME = 60
def __init__(self): if ProjectCache.__instance: raise SingletonExistsException() self.mc = conf.getMemcachedInstance() self.PROJECT_CACHE_TIME = 5 * 60 self.LIST_CACHE_TIME = 3 * 60
def __init__(self): if CategoryCache.__instance: raise SingletonExistsException() self.mc = conf.getMemcachedInstance() self.CATEGORY_CACHE_TIME = 5 * 60