-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
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?
Metadata
Metadata
Assignees
Labels
No labels