mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixup: register vmscheduler configkey (#8116)
This PR registers the global setting VMScheduledJobExpireInterval.
This commit is contained in:
parent
ebf1409622
commit
27ae7d8bc4
@ -34,6 +34,8 @@ import org.apache.cloudstack.api.ApiConstants;
|
||||
import org.apache.cloudstack.api.command.user.vm.RebootVMCmd;
|
||||
import org.apache.cloudstack.api.command.user.vm.StartVMCmd;
|
||||
import org.apache.cloudstack.api.command.user.vm.StopVMCmd;
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
import org.apache.cloudstack.framework.config.Configurable;
|
||||
import org.apache.cloudstack.framework.jobs.AsyncJobDispatcher;
|
||||
import org.apache.cloudstack.framework.jobs.AsyncJobManager;
|
||||
import org.apache.cloudstack.framework.jobs.impl.AsyncJobVO;
|
||||
@ -58,7 +60,7 @@ import java.util.Map;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
public class VMSchedulerImpl extends ManagerBase implements VMScheduler {
|
||||
public class VMSchedulerImpl extends ManagerBase implements VMScheduler, Configurable {
|
||||
private static Logger LOGGER = Logger.getLogger(VMSchedulerImpl.class);
|
||||
@Inject
|
||||
private VMScheduledJobDao vmScheduledJobDao;
|
||||
@ -82,6 +84,16 @@ public class VMSchedulerImpl extends ManagerBase implements VMScheduler {
|
||||
asyncJobDispatcher = dispatcher;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConfigKey<?>[] getConfigKeys() {
|
||||
return new ConfigKey<?>[]{VMScheduledJobExpireInterval};
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getConfigComponentName() {
|
||||
return VMScheduler.class.getSimpleName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeScheduledJobs(List<Long> vmScheduleIds) {
|
||||
if (vmScheduleIds == null || vmScheduleIds.isEmpty()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user