Skip to content

Instantly share code, notes, and snippets.

@adamruzicka
Created May 10, 2019 08:44
Show Gist options
  • Save adamruzicka/d0c69b0e716f6f9b1b78c692278269b7 to your computer and use it in GitHub Desktop.
Save adamruzicka/d0c69b0e716f6f9b1b78c692278269b7 to your computer and use it in GitHub Desktop.
diff --git a/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb b/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb
index 887725d..3c59a22 100644
--- a/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb
+++ b/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb
@@ -42,7 +42,7 @@ module Actions
unless (restored_id = action.input[:current_request_id]).nil?
old_id = ::Logging.mdc['request']
if !old_id.nil? && old_id != restored_id
- action.action_logger.warn(_('Changing request id %{request_id} to saved id %{saved_id}') % { :saved_id => restored_id, :request_id => old_id })
+ action.action_logger.warn('Changing request id %{request_id} to saved id %{saved_id}' % { :saved_id => restored_id, :request_id => old_id })
end
::Logging.mdc['request'] = restored_id
end
diff --git a/lib/smart_proxy_dynflow_core/test_action.rb b/lib/smart_proxy_dynflow_core/test_action.rb
index 5b32082..d0ab0f7 100644
--- a/lib/smart_proxy_dynflow_core/test_action.rb
+++ b/lib/smart_proxy_dynflow_core/test_action.rb
@@ -13,4 +13,14 @@ module SmartProxyDynflowCore
raise "test exception" if input["exception"]
end
end
+
+ class CounterAction < ::Dynflow::Action
+ def run(event = nil)
+ state = 0
+ while state < input[:target]
+ action_logger.debug("COUNTER AT #{state}")
+ state += 1
+ end
+ end
+ end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment