refactor: simplify pull queue admission
This commit is contained in:
parent
7c4e798776
commit
f76b2f8289
|
|
@ -529,8 +529,7 @@ function createWeekPlan({fetchJson,localDate,timeZone,storage,getLogin,now=()=>D
|
|||
}
|
||||
function flushPull() {
|
||||
if(pulling)return pulling;
|
||||
const record=pendingPull(),key=pullKey();
|
||||
if(!record||!key)return Promise.resolve(false);
|
||||
if(!pendingPull()||!pullKey())return Promise.resolve(false);
|
||||
pulling=(async()=>{
|
||||
let result,lastResult=false;
|
||||
while(pendingPull()){
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user