class ActiveRecord::Promise

def pending?

Returns whether the associated query is still being executed or not.
def pending?
  @future_result.pending?
end