コード例 #1
0
        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()
コード例 #2
0
    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)
コード例 #3
0
    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)