We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0b8a57 commit 080372cCopy full SHA for 080372c
backend/pycon/tasks.py
@@ -1,3 +1,4 @@
1
+import os
2
import time
3
import logging
4
import boto3
@@ -39,6 +40,9 @@ def launch_heavy_processing_worker():
39
40
if len(response["taskArns"]) > 0:
41
return
42
43
+ user_id = os.getuid()
44
+ group_id = os.getgroups()[0]
45
+
46
response = ecs_client.run_task(
47
cluster=cluster_name,
48
taskDefinition=f"pythonit-{settings.ENVIRONMENT}-heavy-processing-worker",
@@ -59,6 +63,11 @@ def launch_heavy_processing_worker():
59
63
"roleArn": settings.ECS_SERVICE_ROLE,
60
64
"iops": 16_000,
61
65
"throughput": 1_000,
66
+ "dockerVolumeConfiguration": {
67
+ "driverOpts": {
68
+ "o": f"uid={user_id},gid={group_id}",
69
+ },
70
62
71
},
72
}
73
],
0 commit comments