Skip to content

Commit

Permalink
STY #872 black thrashing
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jan 20, 2024
1 parent 84f68fa commit b70de26
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions apstools/devices/aps_data_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ def _cleanup():

@run_in_thread
def _run_DM_workflow_thread():
logger.info(
"run DM workflow: %s with timeout=%s s", self.workflow.get(), timeout
)
logger.info("run DM workflow: %s with timeout=%s s", self.workflow.get(), timeout)
self.job = self.api.startProcessingJob(
workflowOwner=self.owner.get(),
workflowName=workflow,
Expand All @@ -236,15 +234,9 @@ def _run_DM_workflow_thread():
logger.info(f"DM workflow started: {self}")
# wait for workflow to finish
deadline = time.time() + timeout
while (
time.time() < deadline
and self.status.get() not in "done failed timeout".split()
):
while time.time() < deadline and self.status.get() not in "done failed timeout".split():
self._update_processing_data()
if (
"_report_deadline" not in dir(self)
or time.time() >= self._report_deadline
):
if "_report_deadline" not in dir(self) or time.time() >= self._report_deadline:
_reporter()
time.sleep(self.polling_period.get())

Expand Down

0 comments on commit b70de26

Please sign in to comment.