def run(self): self.call_handler = CallHandler(self) self.__program_handler = ProgramHandler(self.db, self) self.__program_handler.run() while True: time.sleep(1) return
class RadioStation(Station): def run(self): self.call_handler = CallHandler(self) self.__program_handler = ProgramHandler(self.db, self) self.__program_handler.run() while True: time.sleep(1) return def stop(self): self.call_handler.stop() self.__program_handler.stop() pass def __init__(self, station_id): self.id = station_id self.db = SQLAlchemy(telephony_server) self.station = self.db.session.query(Station).filter(Station.id == station_id).one() return