mirror of
https://github.com/blw1138/Zordon.git
synced 2025-12-17 16:58:12 +00:00
Initial commit of index html and add ability to delete jobs
This commit is contained in:
@@ -126,7 +126,7 @@ class RenderQueue:
|
||||
try:
|
||||
logger.debug("Saving Render History")
|
||||
output = {'timestamp': datetime.now().isoformat(),
|
||||
'jobs': [j.json_safe_copy() for j in cls.job_queue],
|
||||
'jobs': [j.json() for j in cls.job_queue],
|
||||
'clients': cls.render_clients}
|
||||
output_path = json_path or JSON_FILE
|
||||
with open(output_path, 'w') as f:
|
||||
@@ -167,9 +167,16 @@ class RenderQueue:
|
||||
|
||||
@classmethod
|
||||
def cancel_job(cls, job):
|
||||
logger.info('Cancelling job ID: {}'.format(job.id))
|
||||
logger.info(f'Cancelling job ID: {job.id}')
|
||||
job.stop()
|
||||
return job.render_status == RenderStatus.CANCELLED
|
||||
return job.render_status() == RenderStatus.CANCELLED
|
||||
|
||||
@classmethod
|
||||
def delete_job(cls, job):
|
||||
logger.info(f"Deleting job ID: {job.id}")
|
||||
job.stop()
|
||||
cls.job_queue.remove(job)
|
||||
return True
|
||||
|
||||
@classmethod
|
||||
def renderer_instances(cls):
|
||||
|
||||
Reference in New Issue
Block a user