lib/plezi/common/api.rb in plezi-0.12.3 vs lib/plezi/common/api.rb in plezi-0.12.4
- old
+ new
@@ -63,15 +63,17 @@
# The server will not be initiatet and instead you will be able to use Plezi controllers and the Redis auto-config
# to broadcast Plezi messages to other Plezi processes - allowing for scalable intigration of Plezi into existing Rack applications.
def start_placebo receiver = nil
# force start Iodine only if Iodine isn't used as the server
if ::Iodine.protocol == ::Iodine::Http::Http1 && (defined?(::Rack) ? (::Rack::Handler.default == ::Iodine::Http::Rack) : true)
- # Iodine.info("`start_placebo` is called while using the Iodine server. `start_placebo` directive being ignored.")
+ Iodine.log("* `start_placebo` Placebo directive ignored, as this seems to be the main application.\n")
+ # just initialize the receiver class (no instance) and return
+ Plezi::Placebo.new(receiver, false) if receiver
return false
end
unless @placebo_initialized
raise "Placebo fatal error: Redis connection failed to load - make sure gem is required and `ENV['PL_REDIS_URL']` is set." unless redis # make sure the redis connection is activated
- puts "* Plezi #{Plezi::VERSION} Services will start with no Server...\n"
+ Iodine.log "* Plezi #{Plezi::VERSION} Services will start with no Server - This is the Placebo application\n"
::Iodine.protocol = :no_server
Iodine.force_start!
@placebo_initialized = true
end
receiver ? Plezi::Placebo.new(receiver) : true
\ No newline at end of file