onPause method
Callback when this executor is paused. Returns true if successfully paused, false otherwise.
Implementation
@override
Future<bool> onPause() async {
// stop the trigger executor so it don't trigger any more.
triggerExecutor?.pause();
// stop the task executor
taskExecutor?.pause();
return true;
}