Closed Mavrrick closed 2 years ago
I think I am going to add a 2nd logger (Information Logging, and Debug Logging). Informational logging is just events, and debug logging will include trace logs. This way we can keep you logging changes in place, but we can the ability to turn the trace logging off.
I spoke to one of the HE staff, and worked out the issue. The sendEvents are not committed until after the called method exits. So these are transacted calls apparently. I will take your changes into consideration for my new logic. But my new code will work considerably different, will be available soon.
The delay fixes the problem, but it is still a race condition. With my changes the race condition will no longer exist.
Integrated the fix through different changes
Updated routine for setCurrentApplication to prevent repeat unschedule tasks when Current app is Roku and on home screen.
Added 2 second delay to run scheduleQueryMediaPlayer from setCurrentApplication routine
Removed redundant unschedules in scheduler tasks as unscheduled are submitted by command routines that call the schedule tasks
Updated Schedule task to Unschedule task routine queryDeviceInfo
Added Debug logging messages to help identify where a issue may occurr. They only activate when debug is turned on.