flush output on init error and when writing log sentinels (#41)
diff --git a/core/ruby2.5Action/rackapp/init.rb b/core/ruby2.5Action/rackapp/init.rb
index caefe52..1e1fd7f 100644
--- a/core/ruby2.5Action/rackapp/init.rb
+++ b/core/ruby2.5Action/rackapp/init.rb
@@ -9,6 +9,7 @@
# Make sure that this action is not initialised more than once
if File.exist? CONFIG then
puts "Error: Cannot initialize the action more than once."
+ STDOUT.flush
return ErrorResponse.new 'Cannot initialize the action more than once.', 403
end
diff --git a/core/ruby2.5Action/rackapp/middleware/sentinel_handler.rb b/core/ruby2.5Action/rackapp/middleware/sentinel_handler.rb
index 2161bde..32c05b5 100644
--- a/core/ruby2.5Action/rackapp/middleware/sentinel_handler.rb
+++ b/core/ruby2.5Action/rackapp/middleware/sentinel_handler.rb
@@ -7,7 +7,9 @@
puts response.body if response.status!=200
puts "XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX"
warn "XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX"
+ STDOUT.flush
+ STDERR.flush
end
response
end
-end
\ No newline at end of file
+end