[AB-184] adding various metrics to the system, organizing imports, changing some transactional behaviour

adding okhttp metrics, split bot service into multiple services (guild, message), unified some places that services are used in order to interact with the api, and not directly the objects (this is to make it easier for metric to be accurate)
This commit is contained in:
Sheldan
2021-01-29 17:46:41 +01:00
parent 2a2a3aea70
commit b838678c15
362 changed files with 3045 additions and 1573 deletions

View File

@@ -10,9 +10,9 @@ import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.TimeZone;
import static org.quartz.SimpleScheduleBuilder.*;
import static org.quartz.CronScheduleBuilder.*;
import static org.quartz.TriggerBuilder.*;
import static org.quartz.CronScheduleBuilder.cronSchedule;
import static org.quartz.SimpleScheduleBuilder.simpleSchedule;
import static org.quartz.TriggerBuilder.newTrigger;
/**
* Bean used to create the different types of jobs supported. The jobs include cron jobs and one-time jobs.

View File

@@ -6,6 +6,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;
@@ -23,7 +24,7 @@ public class SchedulerStartupService {
* Loads the job definitions from the database and schedules them, if the job does not exist yet.
*/
@EventListener
@Transactional
@Transactional(isolation = Isolation.SERIALIZABLE)
public void handleContextRefreshEvent(ContextRefreshedEvent ctxStartEvt) {
schedulerJobManagementServiceBean.findAll().forEach((schedulerJob) -> {
if(!schedulerJobManagementServiceBean.doesJobExist(schedulerJob) || !schedulerJobManagementServiceBean.isJobDefinitionTheSame(schedulerJob)) {