Sha256: 9e55b25bc8c4c34ac1bcafea93ac8ab100c92c6e624328929acae43917a5daf0
Contents?: true
Size: 1.12 KB
Versions: 13
Compression:
Stored size: 1.12 KB
Contents
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/components/logger' module Contrast module Agent # Base class for threads that do async processing class WorkerThread include Contrast::Components::Logger::InstanceMethods def initialize @_thread = nil end def running? !!@_thread&.alive? end def stop! return unless running? return unless @_thread Thread.kill(@_thread) @_thread = nil end # Most threads, we always want to start. Some may be controlled by feature guards though, so we need to check. # # @return [Boolean] def attempt_to_start? true end def clean_properties logger.debug("Cleaning PROPERTIES_HASH size: #{ Contrast::Agent::Assess::Tracker::PROPERTIES_HASH.size }") Contrast::Agent::Assess::Tracker.cleanup! logger.debug("Cleaned PROPERTIES_HASH size: #{ Contrast::Agent::Assess::Tracker::PROPERTIES_HASH.size }") end end end end
Version data entries
13 entries across 13 versions & 1 rubygems