Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/celery/backends/__pycache__/filesystem.cpython-39.pyc
Ðазад
a t�h� � @ sz d Z ddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddl mZ e�d�Z d Zd ZdZG dd � d e �ZdS )z!File-system result store backend.� N)�datetime)�ensure_bytes)�uuid)�KeyValueStoreBackend)�ImproperlyConfiguredFz8You need to configure a path for the file-system backendzHA path for the file-system backend should conform to the file URI schemez�The configured path for the file-system backend does not work correctly, please make sure that it exists and has the correct permissions.c s~ e Zd ZdZdeejejef� fdd� Z d� fdd� Z dd � Zd d� Zdd � Z dd� Zdd� Zdd� Zdd� Zdd� Z� ZS )�FilesystemBackendas File-system result backend. Arguments: url (str): URL to the directory we should use open (Callable): open function to use when opening files unlink (Callable): unlink function to use when deleting files sep (str): directory separator (to join the directory with the key) encoding (str): encoding used on the file-system Nc s� t � j|i |�� || _| �|�}tjdkrB|�d�rB|dd � }|�|�| _|�|�| _ || _ || _| �dt � �|� � d S )N�nt�/� s .fs-backend-)�super�__init__�url� _find_path�os�name� startswith�encode�path�sep�open�unlink�_do_directory_testr ) �selfr r r r �encoding�args�kwargsr �� __class__� ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/celery/backends/filesystem.pyr $ s zFilesystemBackend.__init__r c s( |si n|}t � �|i |�d| ji��S )Nr )r � __reduce__r )r r r r r r r 8 s zFilesystemBackend.__reduce__c C sD |st t��|�d�r"|dd � S |�d�r8|dd � S t t��d S )Nzfile://localhost/� zfile://� )r � E_NO_PATH_SETr �E_PATH_NON_CONFORMING_SCHEME)r r r r r r <