Add automatic storage replication
Adds a worker to automatically replicate data between storages and update the database accordingly
This commit is contained in:
parent
c693afca6a
commit
724b1607d7
18 changed files with 259 additions and 35 deletions
|
@ -539,6 +539,15 @@ class ImageStoragePlacement(BaseModel):
|
|||
)
|
||||
|
||||
|
||||
class UserRegion(BaseModel):
|
||||
user = QuayUserField(index=True, allows_robots=False)
|
||||
location = ForeignKeyField(ImageStorageLocation)
|
||||
|
||||
indexes = (
|
||||
(('user', 'location'), True),
|
||||
)
|
||||
|
||||
|
||||
class Image(BaseModel):
|
||||
# This class is intentionally denormalized. Even though images are supposed
|
||||
# to be globally unique we can't treat them as such for permissions and
|
||||
|
@ -751,4 +760,4 @@ all_models = [User, Repository, Image, AccessToken, Role, RepositoryPermission,
|
|||
ExternalNotificationEvent, ExternalNotificationMethod, RepositoryNotification,
|
||||
RepositoryAuthorizedEmail, ImageStorageTransformation, DerivedImageStorage,
|
||||
TeamMemberInvite, ImageStorageSignature, ImageStorageSignatureKind,
|
||||
AccessTokenKind, Star, RepositoryActionCount, TagManifest]
|
||||
AccessTokenKind, Star, RepositoryActionCount, TagManifest, UserRegion]
|
||||
|
|
Reference in a new issue