added unmute command to end all mutes, and remove the current one, this also cancels all running jobs, so we need to store the triggers

enabled voice state cache, as its necessary for voice state operations
kick user out of voice chat, if they are in any
changed unmute date to the the effective date of the unmute, instead of the planned date
added possibility to stop a job via the trigger key
This commit is contained in:
Sheldan
2020-04-25 11:10:59 +02:00
parent d4eeb2dadb
commit 7ac2f2ce08
14 changed files with 174 additions and 16 deletions

View File

@@ -148,14 +148,23 @@ public class SchedulerServiceBean implements SchedulerService {
}
@Override
public boolean executeJobWithParametersOnce(String name, String group, JobDataMap dataMap, Date date) {
public String executeJobWithParametersOnce(String name, String group, JobDataMap dataMap, Date date) {
Trigger onceOnlyTriggerForJob = scheduleCreator.createOnceOnlyTriggerForJob(name, group, date, dataMap);
try {
schedulerFactoryBean.getScheduler().scheduleJob(onceOnlyTriggerForJob);
return true;
return onceOnlyTriggerForJob.getKey().getName();
} catch (SchedulerException e) {
log.error("Failed to start new job - {}", name, e);
return false;
return null;
}
}
@Override
public void stopTrigger(String triggerKey) {
try {
schedulerFactoryBean.getScheduler().unscheduleJob(TriggerKey.triggerKey(triggerKey));
} catch (SchedulerException e) {
log.error("Failed to cancel job job - {}", triggerKey, e);
}
}