@@ -258,6 +258,7 @@ pub struct TaskQueryInfo {
258258 pub result : Option < serde_json:: Value > ,
259259 pub upstream_task_uuid : Option < Uuid > ,
260260 pub downstream_task_uuid : Option < Uuid > ,
261+ pub reporter_uuid : Option < Uuid > ,
261262}
262263
263264#[ derive( Debug , Serialize , Deserialize , Clone ) ]
@@ -277,6 +278,7 @@ pub struct ParsedTaskQueryInfo {
277278 pub result : Option < TaskResultSpec > ,
278279 pub upstream_task_uuid : Option < Uuid > ,
279280 pub downstream_task_uuid : Option < Uuid > ,
281+ pub reporter_uuid : Option < Uuid > ,
280282}
281283
282284/// Each field in the query request is optional, and the server will return all tasks if no field is specified.
@@ -291,6 +293,8 @@ pub struct TasksQueryReq {
291293 pub states : Option < HashSet < TaskState > > ,
292294 pub exit_status : Option < String > ,
293295 pub priority : Option < String > ,
296+ /// Set reporter_uuid will automatically exclude all non-completed tasks.
297+ pub reporter_uuid : Option < Uuid > ,
294298 pub limit : Option < u64 > ,
295299 pub offset : Option < u64 > ,
296300 pub count : bool ,
@@ -556,8 +560,9 @@ pub struct WorkerShutdown {
556560 pub op : Option < WorkerShutdownOp > ,
557561}
558562
559- #[ derive( Debug , Serialize , Deserialize , Clone ) ]
563+ #[ derive( Debug , Serialize , Deserialize , Clone , Default ) ]
560564pub enum WorkerShutdownOp {
565+ #[ default]
561566 #[ serde( alias = "graceful" ) ]
562567 Graceful ,
563568 #[ serde( alias = "force" ) ]
@@ -575,6 +580,8 @@ pub struct ArtifactsDownloadByFilterReq {
575580 pub states : Option < HashSet < TaskState > > ,
576581 pub exit_status : Option < String > ,
577582 pub priority : Option < String > ,
583+ /// Set reporter_uuid will automatically exclude all non-completed tasks.
584+ pub reporter_uuid : Option < Uuid > ,
578585 pub content_type : ArtifactContentType ,
579586}
580587
@@ -638,6 +645,8 @@ pub struct ArtifactsDeleteByFilterReq {
638645 pub states : Option < HashSet < TaskState > > ,
639646 pub exit_status : Option < String > ,
640647 pub priority : Option < String > ,
648+ /// Set reporter_uuid will automatically exclude all non-completed tasks.
649+ pub reporter_uuid : Option < Uuid > ,
641650 pub content_type : ArtifactContentType ,
642651}
643652
@@ -702,12 +711,6 @@ pub struct TasksSubmitResp {
702711 pub results : Vec < Result < SubmitTaskResp , crate :: error:: ErrorMsg > > ,
703712}
704713
705- impl Default for WorkerShutdownOp {
706- fn default ( ) -> Self {
707- Self :: Graceful
708- }
709- }
710-
711714impl TaskSpec {
712715 pub fn new < T , I , P , Q , V , U > (
713716 args : I ,
0 commit comments