lib/contrast/utils/invalid_configuration_util.rb in contrast-agent-3.11.0 vs lib/contrast/utils/invalid_configuration_util.rb in contrast-agent-3.12.0
- old
+ new
@@ -7,11 +7,11 @@
module Utils
# This utility allows us to report invalid configurations detected in
# customer applications, as determined by Configuration Rules at runtime.
module InvalidConfigurationUtil
include Contrast::Components::Interface
- access_component :agent, :analysis, :contrast_service, :logging
+ access_component :analysis, :app_context, :logging
CS__PATH = 'path'
CS__SESSION_ID = 'sessionId'
CS__SNIPPET = 'snippet'
@@ -43,12 +43,12 @@
activity = Contrast::Api::Dtm::Activity.new
activity.findings << finding
# If assess is enabled, we can just send the activity
- if ASSESS.enabled?
+ if APP_CONTEXT.ready?
build_tags(activity)
- CONTRAST_SERVICE.queue_message activity
+ Contrast::Utils::ServiceSenderUtil.push_to_ready_queue activity
# Otherwise, if the Agent isn't ready, we have to queue the messages
# until we know the starting state.
else
Contrast::Utils::ServiceSenderUtil.add_to_assess_messages activity
end