Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is the callback method that I am asking to be scheduled.
- def transmitMessage(self,inp,output):
- print("Getting the attr")
- a = getattr(self.sAPI,sendMessage)
- print ("the attr is " + str(a))
- self.sAPI.sendMessage(dst=ReadMaps.audionics_output_map[output][1:-1],src=ReadMaps.audionics_input_map[inp][1:-1])
- print ("Calling wheatStone API\n")
- self.wAPI.sendMessage(target = 'DST',command='SRC',cmdtype=0,param1=ReadMaps.wheatNet_output_map[inp][1:-1],src=ReadMaps.wheatNet_input_map[output][1:-1])
- print ("Calling liveWire API\n")
- self.lAPI.sendMessage(dst=ReadMaps.liveWire_output_map[output][1:-1],src=ReadMaps.liveWire_input_map[inp][1:-1])
- This how I schedule it.
- job = self.sched.add_job(self.transmitMessage,'cron',second=line.seconds,minute=line.minutes,hour=line.hours,day=line.dom,month=line.month,year=line.year,day_of_week=line.dow,args=[line.input,line.output])
- self.sched is defined like so: self.sched = BackgroundScheduler()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement