This commit is contained in:
Egor Matveev
2021-11-12 00:53:16 +03:00
parent a31d940429
commit cc95eb34ec
3 changed files with 7 additions and 6 deletions

View File

@@ -65,7 +65,7 @@ class Solution(models.Model):
@property
def volume_directory(self):
return "solution"
return "/sprint-data/worker/" + str(self.id)
def exec_command(self, command, working_directory='app', timeout=None):
return call(f'docker exec -i solution_{self.id} sh -c "cd {working_directory} && {command}"', shell=True, timeout=timeout)