refactor: simplify pull queue admission
This commit is contained in:
1 parent
7c4e798776
commit
f76b2f8289
1 file changed
+1
-2
@@ -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()){
|
||||
|
||||
Reference in new issue
Block a user