Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- statusPollImpl: (stopCheckingFn, interval) ->
- this.getStatus(true).then (status) =>
- if stopCheckingFn(status)
- return $q.when(status)
- else
- return $q.defer()
- pollForStatusWithTimeout: (stopCheckingFn, interval, timeout) ->
- if timeout
- result = timeoutPromise(timeout, this.statusPollImpl(stopCheckingFn, interval))
- else
- result = this.statusPollImpl(stopCheckingFn, interval)
- console.log "WTF is result", result
- result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement