Create unique container per sync
Ref
@@ -7,6 +7,7 @@ import socket
import subprocess
import sys
import traceback
+import uuid
from datetime import datetime
from django.conf import settings
@@ -910,7 +911,8 @@ class DockerBuildEnvironment(BuildEnvironment):
project_name=self.project.slug,
)
else:
- name = f'sync-project-{self.project.pk}-{self.project.slug}'
+ uuid = uuid.uuid4()
+ name = f'sync-{uuid}-project-{self.project.pk}-{self.project.slug}'
return slugify(name[:DOCKER_HOSTNAME_MAX_LEN])
def get_client(self):
