File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -146,14 +146,19 @@ def km_work_all_vs_all(json: dict):
146
146
if return_pmids :
147
147
abc_result ['bc_pmid_intersection' ] = str (bc ['pmid_intersection' ])
148
148
149
- # report percentage of C-terms complete
150
- _update_job_status ('progress' , round (((c_term_n + 1 ) / len (c_terms )), 2 ))
151
- else :
152
- # report percentage of A-B pairs complete
153
- _update_job_status ('progress' , round (((a_term_n + 1 ) / len (a_terms )), 2 ))
154
-
155
149
return_val .append (abc_result )
156
150
151
+ # report percentage of C-terms complete
152
+ if not km_only :
153
+ progress = round (((c_term_n + 1 ) / len (c_terms )), 4 )
154
+ else :
155
+ # report percentage of A-B pairs complete
156
+ progress = round (((a_term_n + 1 ) / len (a_terms )), 4 )
157
+
158
+ # report progress but never report 100% progress until the job is actually done
159
+ _update_job_status ('progress' , min (progress , 0.9999 ))
160
+
161
+ _update_job_status ('progress' , 1.0000 )
157
162
return return_val
158
163
159
164
def triple_miner_work (json : list ):
You can’t perform that action at this time.
0 commit comments