File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed 
apps/webapp/app/presenters/v3 
references/hello-world/src/trigger Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -211,7 +211,7 @@ export class ApiRunListPresenter extends BasePresenter {
211211
212212      const  results  =  await  presenter . call ( environmentId ,  options ) ; 
213213
214-       logger . debug ( "RunListPresenter results" ,  {  results } ) ; 
214+       logger . debug ( "RunListPresenter results" ,  {  runs :  results . runs . length  } ) ; 
215215
216216      const  data : ListRunResponseItem [ ]  =  await  Promise . all ( 
217217        results . runs . map ( async  ( run )  =>  { 
Original file line number Diff line number Diff line change 1+ import  {  logger ,  runs ,  task  }  from  "@trigger.dev/sdk" ; 
2+ 
3+ export  const  sdkMethods  =  task ( { 
4+   id : "sdk-methods" , 
5+   run : async  ( payload : any ,  {  ctx } )  =>  { 
6+     for  await  ( const  run  of  runs . list ( { 
7+       status : [ "COMPLETED" ] , 
8+       from : new  Date ( Date . now ( )  -  1000  *  60  *  60 ) ,  // 1 hour ago 
9+       to : new  Date ( ) ,  // now 
10+     } ) )  { 
11+       logger . info ( "completed run" ,  {  run } ) ; 
12+     } 
13+ 
14+     for  await  ( const  run  of  runs . list ( { 
15+       status : [ "FAILED" ] , 
16+       from : new  Date ( Date . now ( )  -  1000  *  60  *  60 ) ,  // 1 hour ago 
17+       to : new  Date ( ) ,  // now 
18+       limit : 50 , 
19+     } ) )  { 
20+       logger . info ( "failed run" ,  {  run } ) ; 
21+     } 
22+ 
23+     return  runs ; 
24+   } , 
25+ } ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments