expired_in? method #117

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@homakov

homakov commented Aug 30, 2012

Developers usually check .expired? method but it works in a very straightforward manner and doesn't check e.g. will the token be expired in the next couple of seconds. It causes like 0.1-1% failed requests for normal and delayed jobs, not synced unix time because there is always slight network legacy between expired? check and its usage.

if token.expired_in? 3.minutes
  refresh_token
end
delayed_queue.push job
@sferik

This comment has been minimized.

Show comment Hide comment
@sferik

sferik Apr 18, 2013

Contributor

No tests?

Contributor

sferik commented Apr 18, 2013

No tests?

@homakov homakov closed this Aug 15, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment