def resourceOffers(self, driver, offers):
        log.info("Got %d resource offers" % len(offers))
        for offer in offers:
            tasks = self._tasks_for_offer(offer)
            if tasks:
                log.info("Launching tasks %s" % tasks)
            try:
                driver.launchTasks(offer.id, tasks)
            except Exception:
                log.exception("Failed to launch tasks")
                raise
dataset/ETHPy150Open galaxyproject/pulsar/pulsar/mesos/framework.py/PulsarScheduler.resourceOffers/original