Skip to content
Snippets Groups Projects
Commit f6fcf26f authored by felmer's avatar felmer
Browse files

interval of maintenance task can be specified by other units then second.

SVN: 28635
parent 3d7f8364
No related branches found
No related tags found
No related merge requests found
...@@ -24,9 +24,11 @@ import java.util.Date; ...@@ -24,9 +24,11 @@ import java.util.Date;
import java.util.Properties; import java.util.Properties;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateUtils;
import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException; import ch.systemsx.cisd.common.exceptions.ConfigurationFailureException;
import ch.systemsx.cisd.common.properties.PropertyUtils; import ch.systemsx.cisd.common.properties.PropertyUtils;
import ch.systemsx.cisd.common.time.DateTimeUtils;
/** /**
* @author Izabela Adamczyk * @author Izabela Adamczyk
...@@ -63,7 +65,7 @@ public class MaintenanceTaskParameters ...@@ -63,7 +65,7 @@ public class MaintenanceTaskParameters
{ {
this.properties = properties; this.properties = properties;
this.pluginName = pluginName; this.pluginName = pluginName;
interval = PropertyUtils.getLong(properties, INTERVAL_KEY, ONE_DAY_IN_SEC); interval = DateTimeUtils.getDurationInMillis(properties, INTERVAL_KEY, DateUtils.MILLIS_PER_DAY) / 1000;
className = PropertyUtils.getMandatoryProperty(properties, CLASS_KEY); className = PropertyUtils.getMandatoryProperty(properties, CLASS_KEY);
startDate = extractStartDate(PropertyUtils.getProperty(properties, START_KEY)); startDate = extractStartDate(PropertyUtils.getProperty(properties, START_KEY));
executeOnlyOnce = PropertyUtils.getBoolean(properties, ONE_TIME_EXECUTION_KEY, false); executeOnlyOnce = PropertyUtils.getBoolean(properties, ONE_TIME_EXECUTION_KEY, false);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment