Skip to content

checkpoint

django_spire.contrib.sync.django.models.checkpoint

SyncCheckpoint

Bases: Model

peer_node_id = models.CharField(max_length=255, unique=True) class-attribute instance-attribute

peer_sequence = models.BigIntegerField(default=0) class-attribute instance-attribute

local_sequence_pushed = models.BigIntegerField(default=0) class-attribute instance-attribute

after_keys = models.JSONField(default=dict, blank=True) class-attribute instance-attribute

updated_at = models.DateTimeField(auto_now=True) class-attribute instance-attribute

Meta

app_label = 'sync' class-attribute instance-attribute
db_table = 'django_spire_sync_checkpoint' class-attribute instance-attribute

__str__

Source code in django_spire/contrib/sync/django/models/checkpoint.py
def __str__(self) -> str:
    return (
        f'{self.peer_node_id} '
        f'peer={self.peer_sequence} '
        f'pushed={self.local_sequence_pushed}'
    )