File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010* New option ` --verbose ` for the ` datasets ls ` command which lists every
1111 relevant metadata field for the listed datasets.
1212* New output format option for printing CSV: ` --format=csv ` .
13+ * Better error messages for status traces that never finish in ` status --watch ` .
1314* Improved SIGPIPE handling so that ` okdata ` works better with tools
1415 such as ` head ` .
1516
Original file line number Diff line number Diff line change @@ -101,13 +101,23 @@ def wait_until_done(self, trace_id):
101101 if trace_status != "FINISHED" :
102102 print ("Waiting for processing to finish" , end = "" , flush = True )
103103
104- while trace_status != "FINISHED" :
104+ attempts = 0
105+ max_attempts = 100
106+ while trace_status != "FINISHED" and attempts < max_attempts :
105107 print ("." , end = "" , flush = True )
106108 sleep (2 )
109+ attempts += 1
107110 trace_events = self .get_trace_events (trace_id )
108111 trace_status = StatusCommand .find_latest_event (trace_events )["trace_status" ]
109112 print ()
110113
114+ if attempts == max_attempts :
115+ print (
116+ "\n We've waited for a good while now, and processing hasn't "
117+ "yet finished.\n Something else is most likely wrong, maybe a "
118+ "pipeline hasn't been configured for the dataset?\n "
119+ )
120+
111121 return trace_events
112122
113123 def status_for_id (self , trace_id ):
You can’t perform that action at this time.
0 commit comments