You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to work with an ActiveRecord object on the callback but I get the error "cannot yield from root fiber":
EM.synchrony do
User.all.each do |user|
client = EM::IMAP.new('imap.gmail.com',993,true)
client.connect.bind! do
delegate.login(user.email, user.password)
end.bind! do
delegate.select('INBOX')
end.bind! do
delegate.search('1:20')
end.bind! do |ids|
delegate.fetch(ids, "(UID ENVELOPE BODY[TEXT])")
end.callback do |msgs|
user.update_attributes body: msgs.attr["BODY[TEXT]"] # Error here: cannot yield from root fiber
end
end
end
Why does this happen and how can I resolve it?
The text was updated successfully, but these errors were encountered:
I am trying to work with an ActiveRecord object on the callback but I get the error "cannot yield from root fiber":
Why does this happen and how can I resolve it?
The text was updated successfully, but these errors were encountered: