- Add LdapSyncQueue model for deferred LDAP operations - Add Celery tasks: process_ldap_queue_item, process_ldap_queue - Refactor all LDAP signals (employee, department, group, position) to enqueue operations on DirectoryLdapError/DirectoryServiceError - Add _queue.py helper for enqueuing with automatic Celery dispatch - Add Celery Beat periodic task (every 60s) for queue processing - Add management command: ldap_queue (status/retry/cleanup) - Add migration 0043_ldap_sync_queue - Add 18 tests covering model, tasks, signals, and enqueue logic - Include LDAP services refactoring (base_service, constants, user_login_service, user_mapper_service, user_password_service, phone_utils)
19 lines
635 B
Python
19 lines
635 B
Python
class DirectoryServiceError(Exception):
|
||
"""Базовая ошибка сервисного слоя."""
|
||
|
||
|
||
class DirectoryLdapError(DirectoryServiceError):
|
||
"""Ошибка на стороне LDAP."""
|
||
|
||
|
||
class DirectoryConnectionError(DirectoryLdapError):
|
||
"""Ошибка подключения к LDAP-серверу (конфигурация, сеть, аутентификация)."""
|
||
|
||
|
||
class DirectoryDbError(DirectoryServiceError):
|
||
"""Ошибка фиксации изменений в БД."""
|
||
|
||
|
||
class DirectoryGroupError(DirectoryServiceError):
|
||
"""Ошибка операций с LDAP-группами."""
|