#91 -- fix time series tendency estimation
This commit is contained in:
parent
09abd351fb
commit
a4f4679f1e
@ -128,7 +128,8 @@ public class TimeSeriesService {
|
|||||||
if (ts != null && ts.getValues().size() > MIN_TIME_SERIES_LENGTH) {
|
if (ts != null && ts.getValues().size() > MIN_TIME_SERIES_LENGTH) {
|
||||||
JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new JsonTimeSeries(normalizeTimeSeries(ts))));
|
JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new JsonTimeSeries(normalizeTimeSeries(ts))));
|
||||||
LOG.debug("Успешно отправлен на сервис сглаживания");
|
LOG.debug("Успешно отправлен на сервис сглаживания");
|
||||||
if (response.has("response") && response.getString("response").equals("empty")) {
|
if (response.has("response") && response.getString("response").equals("empty")
|
||||||
|
|| !response.has("timeSeries")) {
|
||||||
return DEFAULT_TIME_SERIES_TENDENCY;
|
return DEFAULT_TIME_SERIES_TENDENCY;
|
||||||
}
|
}
|
||||||
JSONArray jsonArray = response.getJSONObject("timeSeries").getJSONArray("values");
|
JSONArray jsonArray = response.getJSONObject("timeSeries").getJSONArray("values");
|
||||||
|
Loading…
Reference in New Issue
Block a user