def check_office_converter_enabled(): config = ConfigParser.ConfigParser() config.read(EVENTS_CONFIG_FILE) enabled = seafevents.is_office_converter_enabled(config) if enabled: logging.debug('office converter: enabled') else: logging.debug('office converter: not enabled') return enabled
def set_sentry_status(enabled=True): config = configparser.ConfigParser() config.read(settings.CONFIG_INI_FILEPATH) config['sentry'] = {} if enabled: config['sentry']['enable_sentry'] = 'yes' else: config['sentry']['enable_sentry'] = 'no' with open(settings.CONFIG_INI_FILEPATH, 'w') as configfile: config.write(configfile)
def check_search_enabled(): enabled = False if hasattr(seafevents, 'is_search_enabled'): config = ConfigParser.ConfigParser() config.read(EVENTS_CONFIG_FILE) enabled = seafevents.is_search_enabled(config) if enabled: logging.debug('search: enabled') else: logging.debug('search: not enabled') return enabled
def get_office_converter_limit(): config = ConfigParser.ConfigParser() config.read(EVENTS_CONFIG_FILE) return seafevents.get_office_converter_limit(config)