Advertisement
Guest User

Untitled

a guest
Nov 1st, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.       statusPollImpl: (stopCheckingFn, interval) ->
  2.         this.getStatus(true).then (status) =>
  3.           if stopCheckingFn(status)
  4.             return $q.when(status)
  5.           else
  6.             return $q.defer()
  7.  
  8.       pollForStatusWithTimeout: (stopCheckingFn, interval, timeout) ->
  9.         if timeout
  10.           result = timeoutPromise(timeout, this.statusPollImpl(stopCheckingFn, interval))
  11.         else
  12.           result = this.statusPollImpl(stopCheckingFn, interval)
  13.         console.log "WTF is result", result
  14.         result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement