관리-도구
편집 파일: worker.cpython-311.pyc
� ^�Dgy � � � d dl Z d dlZd dlmZmZ d dlmZ d dlmZmZ d dl m Z d dlmZ erd dl mZ d dl mZ d d l mZ e� � Z G d � de� � ZdS )� N)�sleep�time)�check_thread_support)�Queue�Full)�logger)�MYPY)�Any)�Optional)�Callablec �^ � e Zd Zd d�Zed� � � Zd� Zd� Zd� Zd� Z dd �Z d � Zd� Zd� Z dS )�BackgroundWorker� c � � t � � t |� � | _ t j � � | _ d | _ d | _ d S �N)r r �_queue� threading�Lock�_lock�_thread�_thread_for_pid)�self� queue_sizes �H/opt/imunify360/venv/lib64/python3.11/site-packages/sentry_sdk/worker.py�__init__zBackgroundWorker.__init__ sA � ������J�'�'����^�%�%�� ����#����� c � � | j t j � � k rdS | j sdS | j � � � S )NF)r �os�getpidr �is_alive�r s r r zBackgroundWorker.is_alive s@ � � ��2�9�;�;�.�.��5��|� ��5��|�$�$�&�&�&r c �@ � | j s| � � � d S d S r )r �startr! s r �_ensure_threadzBackgroundWorker._ensure_thread&