constants.py 917 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Copyright © 2023 Ingram Micro Inc. All rights reserved.
  2. ALL_BASIC_FIELDS = '__all__'
  3. FIELDS_TRACKER_FIELD_NAME = '__fields_tracker'
  4. TRACKED_FIELDS_ATTR_NAME = '__tracked_fields'
  5. class SignalType:
  6. """Type of signal that generates this event."""
  7. SAVE = 'SAVE'
  8. """The master model has been saved."""
  9. DELETE = 'DELETE'
  10. """The master model has been deleted."""
  11. SYNC = 'SYNC'
  12. """The master model needs syncronization."""
  13. NO_QUEUE = 'None'
  14. DEFAULT_DEAD_MESSAGE_TTL = 864000 # 10 days
  15. DEFAULT_MASTER_AUTO_UPDATE_FIELDS = False
  16. DEFAULT_MASTER_MESSAGE_TTL = 86400 # 1 day
  17. DEFAULT_REPLICA_MAX_RETRIES = 30
  18. DEFAULT_REPLICA_RETRY_DELAY = 2 # seconds
  19. DEFAULT_REPLICA_DELAY_QUEUE_MAX_SIZE = 1000
  20. DB_VENDOR_PG = 'postgresql'
  21. DB_VENDOR_MYSQL = 'mysql'
  22. SUPPORTED_TIMEOUT_DB_VENDORS = {DB_VENDOR_MYSQL, DB_VENDOR_PG}
  23. PG_TIMEOUT_FLAG = 'statement timeout'
  24. MYSQL_TIMEOUT_ERROR_CODE = 3024