lib/sinbotra/bot.rb in sinbotra-0.1.4 vs lib/sinbotra/bot.rb in sinbotra-0.1.5

- old
+ new

@@ -8,11 +8,14 @@ module Sinbotra class Bot class << self def handle(provider, entry) Sinbotra::Config.logger.debug("ENTRY DEBUG:\n" + entry.inspect) if ENV["DEBUG"] - #perform_async(provider, entry) - new.perform(provider, entry) + if ENV["SINBOTRA_SYNCHRONOUS"] + new.perform(provider, entry) + else + perform_async(provider, entry) + end end def add_handler(provider, handler) @handlers ||= {} @handlers[provider.to_sym] = handler