This is an automated email from the ASF dual-hosted git repository.
dgrove pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-runtime-ruby.git
The following commit(s) were added to refs/heads/master by this push:
new 3619b81 flush output on init error and when writing log sentinels
(#41)
3619b81 is described below
commit 3619b81371d8ac5d2828ecc92c6f2d43eb2ca3e8
Author: David Grove <[email protected]>
AuthorDate: Mon Feb 3 21:00:12 2020 -0500
flush output on init error and when writing log sentinels (#41)
---
core/ruby2.5Action/rackapp/init.rb | 1 +
core/ruby2.5Action/rackapp/middleware/sentinel_handler.rb | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
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 @@ class InitApp
# 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 @@ class SentinelHandler < MiddlewareBase
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