Class: WatchmonkeyCli::TelegramBot::PromiseHandler
Instance Method Summary
collapse
Methods inherited from BetterQueue
#initialize, #sync
Instance Method Details
#await_all! ⇒ Object
96
97
98
99
100
|
# File 'lib/watchmonkey_cli/hooks/telegram_bot.rb', line 96
def await_all!
while p = shift
p.wait
end
end
|
#scrub! ⇒ Object
90
91
92
93
94
|
# File 'lib/watchmonkey_cli/hooks/telegram_bot.rb', line 90
def scrub!
@stor.dup.each_with_index do |p, i|
@stor.delete(p) if [:fulfilled, :rejected].include?(p.state)
end
end
|