
     h                         d dl Z d dlmZ 	  e j                    Zn# e$ r dZY nw xY w G d de          Z e            ZdS )    N)settings   c                       e Zd ZdZed             Zed             Zed             Zed             Zed             Z	ed             Z
ed             Zd	S )
AppSettingsz
    c                 .    t          t          dd          S )0Control how many times a task will be attempted.MAX_ATTEMPTS   getattrr   selfs    T/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/background_task/settings.pyr	   zAppSettings.MAX_ATTEMPTS   s     x444    c                     | j         S )r   )r	   r   s    r   BACKGROUND_TASK_MAX_ATTEMPTSz(AppSettings.BACKGROUND_TASK_MAX_ATTEMPTS          r   c                 .    t          t          dd          S )SMaximum possible task run time, after which tasks will be unlocked and tried again.MAX_RUN_TIMEi  r   r   s    r   r   zAppSettings.MAX_RUN_TIME   s     x666r   c                     | j         S )r   )r   r   s    r   BACKGROUND_TASK_MAX_RUN_TIMEz(AppSettings.BACKGROUND_TASK_MAX_RUN_TIME   r   r   c                 .    t          t          dd          S )z7Control if tasks will run asynchronous in a ThreadPool.BACKGROUND_TASK_RUN_ASYNCFr   r   s    r   r   z%AppSettings.BACKGROUND_TASK_RUN_ASYNC#   s     x!<eDDDr   c                 8    t          t          dt                    S )z%Specify number of concurrent threads.BACKGROUND_TASK_ASYNC_THREADS)r   r   	cpu_countr   s    r   r   z)AppSettings.BACKGROUND_TASK_ASYNC_THREADS(   s     x!@)LLLr   c                 H    t          t          dd          }|dk    rd}nd}|S )uF  
        Control the ordering of tasks in the queue.
        Choose either `DESC` or `ASC`.

        https://en.m.wikipedia.org/wiki/Nice_(Unix)
        A niceness of −20 is the highest priority and 19 is the lowest priority. The default niceness for processes is inherited from its parent process and is usually 0.
        !BACKGROUND_TASK_PRIORITY_ORDERINGDESCASC -r   )r   orderprefixs      r   r   z-AppSettings.BACKGROUND_TASK_PRIORITY_ORDERING-   s0     "EvNNE>>FFFr   N)__name__
__module____qualname____doc__propertyr	   r   r   r   r   r   r    r   r   r   r      s         5 5 X5 ! ! X! 7 7 X7 ! ! X! E E XE M M XM   X  r   r   )multiprocessingdjango.confr   r   	Exceptionobjectr   app_settingsr+   r   r   <module>r1      s                   ))++II   III/ / / / /& / / /b {}}s    &&