@task(run_every=timedelta(days=7))
    def import_data(self, **metadata):
        
        deleted_routes = set(Route.objects.filter(external_ref__startswith=self._url).values_list('external_ref'))
        archive = ZipFile(StringIO(urlopen(self._url).read()))
        for file in archive.namelist():
            logger.info(file)
            routes = self._import_cif(archive.open(file))
            logger.info(': %d routes in file\n' % len(routes))
            self._import_routes(routes)
            deleted_routes -= set(self._url + route['id'] for route in routes)
        archive.close()
        
        for route in deleted_routes:
            Route.objects.filter(external_ref=route).delete()
dataset/ETHPy150Open mollyproject/mollyproject/molly/apps/places/providers/atcocif.py/AtcoCifTimetableProvider.import_data/original