added command to sync roles for the whole server

added command to remove a role from the experience roles
added leaderboard command
added rank command
fixed missfire configuration for cron jobs (they should not be executed)
added ability to configure recovery for jobs
added tracking of message count
added join listener to automatically give the appropriate role for a joined user
added parameter to join listener containing the userInAServer
re-added command exception templates
added method to create a status message (basically only a single message is returned and expected)
added method to edit a single message in a channel to channel service
fixed cases in which there are no embeds, but we still used the embed principle of sending messages (only text was send)
added more functions to channel service to send messages with
moved joined listeners to their separate transaction
This commit is contained in:
Sheldan
2020-04-12 19:35:42 +02:00
parent 6a31dfde8a
commit edb270e887
53 changed files with 828 additions and 25 deletions

View File

@@ -39,7 +39,7 @@ public class QuartzConfigFactory {
public CronTrigger createBasicCronTrigger(Date startTime, String cronExpression) {
return newTrigger()
.withSchedule(cronSchedule(cronExpression).inTimeZone(TimeZone.getTimeZone("UTC")).withMisfireHandlingInstructionIgnoreMisfires())
.withSchedule(cronSchedule(cronExpression).inTimeZone(TimeZone.getTimeZone("UTC")).withMisfireHandlingInstructionDoNothing())
.startAt(startTime)
.build();
}

View File

@@ -15,6 +15,7 @@ public class SchedulerJobConverter {
.active(properties.getActive())
.cronExpression(properties.getCronExpression())
.clazz(properties.getClazz())
.recovery(properties.getRecovery())
.build();
}
}

View File

@@ -14,4 +14,5 @@ public class SchedulerJobProperties {
private String cronExpression;
private String clazz;
private Boolean active;
private Boolean recovery;
}

View File

@@ -56,7 +56,7 @@ public class SchedulerServiceBean implements SchedulerService {
// if its only started by triggers, it needs to be durable
boolean recurringJob = isRecurringJob(schedulerJob);
jobDetail = scheduleCreator.createJob((Class<? extends QuartzJobBean>) Class.forName(schedulerJob.getClazz()),
!recurringJob, context, schedulerJob.getName(), schedulerJob.getGroupName(), false);
!recurringJob, context, schedulerJob.getName(), schedulerJob.getGroupName(), schedulerJob.isRecovery());
if(recurringJob) {
Trigger trigger = scheduleCreator.createBasicCronTrigger(new Date(),
schedulerJob.getCronExpression());

View File

@@ -9,7 +9,7 @@ spring.quartz.properties.org.quartz.threadPool.threadCount=20
spring.quartz.properties.org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreTX
spring.quartz.properties.org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.PostgreSQLDelegate
spring.quartz.properties.org.quartz.jobStore.useProperties=true
spring.quartz.properties.org.quartz.jobStore.misfireThreshold=60000
spring.quartz.properties.org.quartz.jobStore.misfireThreshold=45000
spring.quartz.properties.org.quartz.jobStore.tablePrefix=qrtz_
spring.quartz.properties.org.quartz.jobStore.isClustered=false
spring.quartz.properties.org.quartz.plugin.shutdownHook.class=org.quartz.plugins.management.ShutdownHookPlugin