Compare commits
No commits in common. "d08f76ec99a508272dc358858b0e3e963c813147" and "f6408e018873937a51c8474c7694e2fea35d1cde" have entirely different histories.
d08f76ec99
...
f6408e0188
@ -317,7 +317,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function reportloader_alpha(dfn, rpt_id, fn_map, omega) {
|
function reportloader_alpha(dfn, rpt_id, fn_map, omega) {
|
||||||
var dt_omega = strptime_vista(omega), cursor = Math.floor(strftime_vista(new Date())) + 0.235959999, interval = 86400000*365*2, data = [], dt_end, hasmore = true;
|
var dt_omega = strptime_vista(omega), cursor = Math.floor(strftime_vista(new Date())) + 0.235959999, interval = 86400000*3650, data = [], dt_end, hasmore = true;
|
||||||
async function fn(client, alpha) {
|
async function fn(client, alpha) {
|
||||||
var dt_alpha = strptime_vista(alpha);
|
var dt_alpha = strptime_vista(alpha);
|
||||||
if(alpha !== undefined) {
|
if(alpha !== undefined) {
|
||||||
@ -331,17 +331,14 @@
|
|||||||
if((data.length > 0) && ((dt_alpha > dt_end) || (alpha === undefined)) && ((res.length < 1) || (res[res.length - 1] !== data[data.length - 1]))) res.next = strftime_vista(res.dt_next = dt_end); // lookahead
|
if((data.length > 0) && ((dt_alpha > dt_end) || (alpha === undefined)) && ((res.length < 1) || (res[res.length - 1] !== data[data.length - 1]))) res.next = strftime_vista(res.dt_next = dt_end); // lookahead
|
||||||
else if(hasmore) {
|
else if(hasmore) {
|
||||||
var count = data.length;
|
var count = data.length;
|
||||||
while(interval <= 86400000*365*8) {
|
cursor = Math.floor(strftime_vista(new Date(strptime_vista(cursor) - interval)));
|
||||||
cursor = Math.floor(strftime_vista(new Date(strptime_vista(cursor) - interval)));
|
data = (await client.ORWRP_REPORT_TEXT(dfn, rpt_id, '', SZ_RANGE, '', cursor, -1)).map(fn_map).sort((a, b) => b.time - a.time);
|
||||||
data = (await client.ORWRP_REPORT_TEXT(dfn, rpt_id, '', SZ_RANGE, '', cursor, -1)).map(fn_map).sort((a, b) => b.time - a.time);
|
if(data.length > count) res.next = strftime_vista(res.dt_next = dt_end = data_endtime(data));
|
||||||
if(data.length > count) {
|
else {
|
||||||
res.next = strftime_vista(res.dt_next = dt_end = data_endtime(data));
|
data = (await client.ORWRP_REPORT_TEXT(dfn, rpt_id, '', SZ_RANGE, '', -1, -1)).map(fn_map).sort((a, b) => b.time - a.time);
|
||||||
return res;
|
cursor = Math.floor(res.next = strftime_vista(res.dt_next = dt_end = data_endtime(data)));
|
||||||
} else interval *= 2;
|
hasmore = false;
|
||||||
}
|
}
|
||||||
data = (await client.ORWRP_REPORT_TEXT(dfn, rpt_id, '', SZ_RANGE, '', -1, -1)).map(fn_map).sort((a, b) => b.time - a.time);
|
|
||||||
cursor = Math.floor(res.next = strftime_vista(res.dt_next = dt_end = data_endtime(data)));
|
|
||||||
hasmore = false;
|
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -505,8 +502,10 @@
|
|||||||
resultsets[i] = await loaders[i](this.client, alpha);
|
resultsets[i] = await loaders[i](this.client, alpha);
|
||||||
if(resultsets[i].next) next.push(resultsets[i].next);
|
if(resultsets[i].next) next.push(resultsets[i].next);
|
||||||
}
|
}
|
||||||
this.date_next = next.length > 0 ? strptime_vista(Math.floor(Math.max(...next))) : null;
|
if(next.length > 0) {
|
||||||
if(!alpha) this.date_begin = this.date_next;
|
this.date_next = strptime_vista(Math.floor(Math.max(...next)));
|
||||||
|
if(!alpha) this.date_begin = this.date_next;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.dfn = null;
|
this.dfn = null;
|
||||||
this.loaders = {};
|
this.loaders = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user