def spinner_start(self, message="Starting "): """ Function for starting a spinner when prompted from a plugin and a default message for performing the task """ self.spinner_running = True self.spinner = SpinnerThread(message, 0.15) self.spinner.start()
def cancel(self, schedule_id): """ Cancel event scheduled with schedule :param schedule_id: id returned by schedule """ spinner = SpinnerThread('Cancelling', 0.15) spinner.start() self.scheduler.cancel(schedule_id) spinner.stop() self.say('Cancellation successful', Fore.GREEN)