File tree 1 file changed +9
-5
lines changed
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,8 @@ class DataGen {
31
31
)
32
32
}
33
33
34
- static Workspace workspace (String name , Map<String , String > agents = [:]) {
35
- UUID wsId = UUID . randomUUID()
36
- UUID ownerId = UUID . randomUUID()
37
- List<WorkspaceResource > resources = agents. collect{ agentName , agentId -> new WorkspaceResource (
34
+ static WorkspaceResource resource (String agentName , String agentId ){
35
+ return new WorkspaceResource (
38
36
UUID . randomUUID(), // id
39
37
new Date (). toInstant(), // created_at
40
38
UUID . randomUUID(), // job_id
@@ -70,7 +68,13 @@ class DataGen {
70
68
)),
71
69
null , // metadata
72
70
0 , // daily_cost
73
- )}
71
+ )
72
+ }
73
+
74
+ static Workspace workspace (String name , Map<String , String > agents = [:]) {
75
+ UUID wsId = UUID . randomUUID()
76
+ UUID ownerId = UUID . randomUUID()
77
+ List<WorkspaceResource > resources = agents. collect{ resource(it. key, it. value)}
74
78
return new Workspace (
75
79
wsId,
76
80
new Date (). toInstant(), // created_at
You can’t perform that action at this time.
0 commit comments