def retrieve(): for key, option in OPTIONS_BY_KEY.items(): if option.scope != scope: continue # Retrieve option details from database option = option.get(account) # Convert option to dictionary yield option.to_dict()
def load(self, account): log.debug('Task Configuration:') # Load options from database for key, option in OPTIONS_BY_KEY.items(): if option.scope == 'account': self._options[key] = option.get(account) elif option.scope == 'server': self._options[key] = option.get() log.debug(' - [%s]: %r', key, self._options[key].value)
def load(self, account): log.debug('Sync Configuration:') # Load options from database for key, option in OPTIONS_BY_KEY.items(): if option.scope == 'account': self._options[key] = option.get(account) elif option.scope == 'server': self._options[key] = option.get() log.debug(' - [%s]: %r', key, self._options[key].value)