CE-936 - Move adding default schedulableTypes in instance to Enricher

This commit is contained in:
2024-03-19 20:00:49 -05:00
parent 17899c3fdc
commit 24b1daa110
2 changed files with 13 additions and 9 deletions

View File

@ -77,6 +77,7 @@ import com.kingsrook.qqq.backend.core.processes.implementations.bulk.insert.Bulk
import com.kingsrook.qqq.backend.core.processes.implementations.bulk.insert.BulkInsertTransformStep;
import com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.ExtractViaQueryStep;
import com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwithfrontend.StreamedETLWithFrontendProcess;
import com.kingsrook.qqq.backend.core.scheduler.QScheduleManager;
import com.kingsrook.qqq.backend.core.utils.CollectionUtils;
import com.kingsrook.qqq.backend.core.utils.ListingHash;
import com.kingsrook.qqq.backend.core.utils.StringUtils;
@ -159,6 +160,18 @@ public class QInstanceEnricher
}
enrichJoins();
//////////////////////////////////////////////////////////////////////////////
// if the instance DOES have 1 or more scheduler, but no schedulable types, //
// then go ahead and add the default set that qqq knows about //
//////////////////////////////////////////////////////////////////////////////
if(CollectionUtils.nullSafeHasContents(qInstance.getSchedulers()))
{
if(CollectionUtils.nullSafeIsEmpty(qInstance.getSchedulableTypes()))
{
QScheduleManager.defineDefaultSchedulableTypesInInstance(qInstance);
}
}
}

View File

@ -102,15 +102,6 @@ public class QScheduleManager
{
qScheduleManager = new QScheduleManager(qInstance, systemUserSessionSupplier);
/////////////////////////////////////////////////////////////////
// if the instance doesn't have any schedulable types defined, //
// then go ahead and add the default set that qqq knows about //
/////////////////////////////////////////////////////////////////
if(CollectionUtils.nullSafeIsEmpty(qInstance.getSchedulableTypes()))
{
defineDefaultSchedulableTypesInInstance(qInstance);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// initialize the scheduler(s) we're configured to use //
// do this, even if we won't start them - so, for example, a web server can still be aware of schedules in the application //