abstract
2017-01-17 14:06:39 1 举报
abstract
作者其他创作
大纲/内容
doc.nextRetryTimestamp = new Date() + 1000*60doc.pushStatus = 'unpush'doc.retryTime=retry; retry++ ;
遍历PushStack数据库;funcion wrapper(){let pushStack = PushStack.find({}).cursor()for(let doc=yield pushStack.next(); doc !=null; doc=yield pushStack.next() ){...}}
true
let myClass =require(`../classes/${doc.class}`);let myClassFunc = doc.func;let myClassInstance = new myClass(doc);let pushFunc = myClassInstance[myClassFunc];
doc.pushStatus = pushing
doc.pushStatus = 'pushed'
存在data
开始
判断doc.pushStatus ==='unpush' && doc.nextRetryTimestamp new Date()
1. 遍历PushStack时的查询条件:pushStatus、nextRetryTime2.先根据class require类,实例化之后再调用相应的func3.失败了把pushStatus 改为unpush,失败次数加1
存在err
0 条评论
下一页