lib/sidekiq/hierarchy/faraday/middleware.rb in sidekiq-hierarchy-1.1.0 vs lib/sidekiq/hierarchy/faraday/middleware.rb in sidekiq-hierarchy-2.0.0

- old
+ new

@@ -4,11 +4,11 @@ module Sidekiq module Hierarchy module Faraday class Middleware < ::Faraday::Middleware def call(env) - if Sidekiq::Hierarchy.current_workflow && Sidekiq::Hierarchy.current_jid - env[:request_headers][Sidekiq::Hierarchy::Http::JID_HEADER] = Sidekiq::Hierarchy.current_jid + if Sidekiq::Hierarchy.current_workflow && Sidekiq::Hierarchy.current_job + env[:request_headers][Sidekiq::Hierarchy::Http::JOB_HEADER] = Sidekiq::Hierarchy.current_job.jid env[:request_headers][Sidekiq::Hierarchy::Http::WORKFLOW_HEADER] = Sidekiq::Hierarchy.current_workflow.jid end @app.call(env) end end