def remove_harvest_source(self): if len(self.args) >= 2: source_id_or_name = unicode(self.args[1]) else: print("Please provide a source id") sys.exit(1) utils.remove_harvest_source(source_id_or_name)
def remove(ctx, id): """Remove (deactivate) a harvester source, whilst leaving any related datasets, jobs and objects. """ flask_app = ctx.meta["flask_app"] with flask_app.test_request_context(): utils.remove_harvest_source(id) click.secho("Removed harvest source: {0}".format(id), fg="green")