More jobs API cleanup

This commit is contained in:
Brett Williams
2026-06-06 08:09:45 -05:00
parent 5e154b6bab
commit 62e4a214e1
9 changed files with 31 additions and 31 deletions
+2 -2
View File
@@ -608,8 +608,8 @@ class SubmitWorker(QThread):
input_path = Path(latest_engine.perform_presubmission_tasks(input_path))
# submit
err_msg = ""
result = self.window.server_proxy.post_job_to_server(file_path=input_path, job_data=job_json,
callback=create_callback)
result = self.window.server_proxy.create_job(file_path=input_path, job_data=job_json,
callback=create_callback)
if not (result and result.ok):
err_msg = f"Error posting job to server: {result.text}"
+4 -4
View File
@@ -563,7 +563,7 @@ class MainWindow(QMainWindow):
return
if len(job_ids) == 1:
job = next((job for job in self.current_server_proxy.get_all_jobs() if job.get('id') == job_ids[0]), None)
job = next((job for job in self.current_server_proxy.get_jobs() if job.get('id') == job_ids[0]), None)
if job:
display_name = job.get('name', os.path.basename(job.get('input_path', '')))
message = f"Are you sure you want to stop job: {display_name}?"
@@ -592,7 +592,7 @@ class MainWindow(QMainWindow):
return
if len(job_ids) == 1:
job = next((job for job in self.current_server_proxy.get_all_jobs() if job.get('id') == job_ids[0]), None)
job = next((job for job in self.current_server_proxy.get_jobs() if job.get('id') == job_ids[0]), None)
if job:
display_name = job.get('name', os.path.basename(job.get('input_path', '')))
message = f"Are you sure you want to delete the job:\n{display_name}?"
@@ -627,7 +627,7 @@ class MainWindow(QMainWindow):
return
for job_id in job_ids:
job_info = self.current_server_proxy.get_job_info(job_id)
job_info = self.current_server_proxy.get_job(job_id)
path = os.path.dirname(job_info['output_path'])
launch_url(path)
@@ -666,7 +666,7 @@ class BackgroundUpdater(QThread):
ZeroconfServer.get_hostname_properties(x)['api_version'] == API_VERSION]
if self.window.current_server_proxy:
self.window.job_data[self.window.current_server_proxy.hostname] = \
self.window.current_server_proxy.get_all_jobs(ignore_token=False)
self.window.current_server_proxy.get_jobs(ignore_token=False)
self.needs_update = False
self.updated_signal.emit()
time.sleep(0.05)