def archiver(self, res_id): import ckanext.archiver.plugin from ckan import model from pylons import config res = model.Session.query(model.Resource).get(res_id) assert res, 'Could not find res: %s' % res_id plugin = ckanext.archiver.plugin.ArchiverPlugin() plugin.configure(config) plugin.notify(res)
def os(self, dataset_id): import ckanext.os.plugin from ckan import model from pylons import config res = model.Package.get(dataset_id) assert res, 'Could not find package: %s' % dataset_id plugin = ckanext.os.plugin.SpatialIngesterPlugin() plugin.configure(config) plugin.notify(res)