Issue #2448 fix scheduling for start/stop of subscription.
Former-commit-id: de110d3747096601a122f64cc5d6037823213e92
This commit is contained in:
parent
0dbc31b756
commit
b6f1468b7e
2 changed files with 21 additions and 7 deletions
|
@ -72,6 +72,7 @@ import com.raytheon.uf.edex.datadelivery.bandwidth.retrieval.RetrievalStatus;
|
|||
* Oct 10, 2013 1797 bgonzale Refactored registry Time objects.
|
||||
* Oct 30, 2013 2448 dhladky Fixed pulling data before and after activePeriod starting and ending.
|
||||
* Nov 5, 2013 2521 dhladky Fixed DataSetMetaData update failures for URL's in pointdata.
|
||||
* Nov 12, 2013 2448 dhladky Fixed stop/start subscription scheduling problem.
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -236,6 +237,7 @@ public class BandwidthDaoUtil<T extends Time, C extends Coverage> {
|
|||
subscriptionStart.set(Calendar.HOUR_OF_DAY, cycle);
|
||||
for (Integer minute : minutes) {
|
||||
subscriptionStart.set(Calendar.MINUTE, minute);
|
||||
// Check for nonsense
|
||||
if (subscriptionStart.after(subscriptionEnd)) {
|
||||
break outerloop;
|
||||
}
|
||||
|
@ -243,14 +245,25 @@ public class BandwidthDaoUtil<T extends Time, C extends Coverage> {
|
|||
Calendar time = TimeUtil.newCalendar();
|
||||
time.setTimeInMillis(subscriptionStart
|
||||
.getTimeInMillis());
|
||||
// Last check for time window, this checks fine grain by hour and minute
|
||||
if (activePeriodStart != null && activePeriodEnd != null) {
|
||||
if (time.after(activePeriodEnd) || time.before(activePeriodStart)) {
|
||||
// discard this retrieval time, outside activePeriod window
|
||||
/**
|
||||
* Fine grain check by hour and minute, for subscription(start/end),
|
||||
* activePeriod(start/end)
|
||||
**/
|
||||
// Subscription Start and End time first
|
||||
if (subscriptionStart != null && subscriptionEnd != null) {
|
||||
if (time.after(subscriptionEnd) || time.before(subscriptionStart)) {
|
||||
// don't schedule this retrieval time, outside subscription window
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Check Active Period Second
|
||||
if (activePeriodStart != null && activePeriodEnd != null) {
|
||||
if (time.after(activePeriodEnd) || time.before(activePeriodStart)) {
|
||||
// don't schedule this retrieval time, outside activePeriod window
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
subscriptionTimes.add(time);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.io.File;
|
|||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.raytheon.edex.colormap.ColorMapManager;
|
||||
import com.raytheon.uf.common.comm.ProxyConfiguration;
|
||||
import com.raytheon.uf.common.comm.ProxyUtil;
|
||||
import com.raytheon.uf.common.localization.IPathManager;
|
||||
|
@ -47,6 +46,7 @@ import dods.dap.DConnect;
|
|||
* Apr 01, 2013 1786 mpduff Pulled proxy settings out to util class.
|
||||
* May 12, 2013 753 dhladky Expanded for use with other connection types
|
||||
* Aug 30, 2013 2314 mpduff Added null checks.
|
||||
* Nov 12, 2013 * dhladky Fixed copy paste error
|
||||
* </pre>
|
||||
*
|
||||
* @author djohnson
|
||||
|
@ -54,8 +54,9 @@ import dods.dap.DConnect;
|
|||
*/
|
||||
|
||||
public class ConnectionUtil {
|
||||
|
||||
private static final IUFStatusHandler statusHandler = UFStatus
|
||||
.getHandler(ColorMapManager.class);
|
||||
.getHandler(ConnectionUtil.class);
|
||||
|
||||
private static final String PROXY_PROPERTIES_FILE = "datadelivery"
|
||||
+ File.separator + "proxy.properties";
|
||||
|
|
Loading…
Add table
Reference in a new issue