File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -31,10 +31,8 @@ class DataGen {
3131 )
3232 }
3333
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 (
3836 UUID . randomUUID(), // id
3937 new Date (). toInstant(), // created_at
4038 UUID . randomUUID(), // job_id
@@ -70,7 +68,13 @@ class DataGen {
7068 )),
7169 null , // metadata
7270 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)}
7478 return new Workspace (
7579 wsId,
7680 new Date (). toInstant(), // created_at
You can’t perform that action at this time.
0 commit comments