def clear_harvest_source_history(self): keep_current = bool(self.options.keep_current) source_id = None if len(self.args) >= 2: source_id = unicode_safe(self.args[1]) print(utils.clear_harvest_source_history(source_id, keep_current))
def clear_history(ctx, id): """If no source id is given the history for all harvest sources (maximum is 1000) will be cleared. Clears all jobs and objects related to a harvest source, but keeps the source itself. The datasets imported from the harvest source will NOT be deleted!!! If a source id is given, it only clears the history of the harvest source with the given source id. """ flask_app = ctx.meta["flask_app"] with flask_app.test_request_context(): result = utils.clear_harvest_source_history(id) click.secho(result, fg="green")
def clear_harvest_source_history(self): source_id = None if len(self.args) >= 2: source_id = unicode(self.args[1]) print(utils.clear_harvest_source_history(source_id))
def clear_harvest_source_history(self): source_id = None if len(self.args) >= 2: source_id = six.text_type(self.args[1]) print(utils.clear_harvest_source_history(source_id))