Commit 6803065e by 朱建香

#1:uloop参数更改

parent 89fc4d3d
......@@ -11,7 +11,7 @@ class Loop{
this.watcher = null;
this.time = null;
this.loopContent = params.loopContent;
this.timeout = params.timeout || 10;
this.times = params.times || 10;
this.fincb = params.fincb;
this.intervalTime = params.interval.delay;
this.intervalcb = params.interval.cb;
......@@ -82,7 +82,7 @@ class Loop{
this.handle = setInterval(() => {
times++;
console.log('times'+times);
if(times > this.timeout){
if(times > this.times){
this.clearTime();
this.canDo = false;
this.fincb.error('timeout');
......
......@@ -23,7 +23,7 @@ class unotify{
loopContent: () => {
return self.getCidOnce();
},
timeout: times,
times: times,
interval:{
delay: 1000,
cb: {
......
......@@ -689,7 +689,7 @@ async function loopGetLockInfo(self, delay, timeout){
return iot.business.api.send('lock/getNewInfo', urlParams, true, false);
// return plus.push.getClientInfo().clientid;
},
timeout: 3,
times: 3,
interval:{
delay: config.intervalTime*1000,
cb: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment