mirror of
https://github.com/blw1138/Zordon.git
synced 2026-06-09 13:39:24 -05:00
REST API endpoint streamlining and cleanup (#133)
* Consolidate engine_info api calls * Change api methods to use POST when possible * Delete engine API cleanup * Remove redundant installed_engines endpoint * Update proxy to use similar named methods to new API calls * More API cleanup * Jobs API cleanup * More jobs API cleanup * Fix add jobs error due to null queue * Remove unnecessary full_status and snapshot API endpoints * Streamline add job POST endpoint * Fix test after method name change
This commit is contained in:
+3
-3
@@ -95,7 +95,7 @@ def main():
|
||||
|
||||
new_job = {"name": job_name, "engine_name": args.engine}
|
||||
try:
|
||||
response = found_proxy.post_job_to_server(file_path, new_job)
|
||||
response = found_proxy.create_job(file_path, new_job)
|
||||
except Exception as e:
|
||||
print(f"Error creating job: {e}")
|
||||
exit(1)
|
||||
@@ -113,7 +113,7 @@ def main():
|
||||
while percent_complete < 1.0:
|
||||
# add checks for errors
|
||||
time.sleep(1)
|
||||
running_job_data = found_proxy.get_job_info(job_id)
|
||||
running_job_data = found_proxy.get_job(job_id)
|
||||
percent_complete = running_job_data['percent_complete']
|
||||
sys.stdout.write("\x1b[1A") # Move up 1
|
||||
sys.stdout.write("\x1b[0J") # Clear from cursor to end of screen (optional)
|
||||
@@ -128,4 +128,4 @@ def main():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user