Commit c04950f3 authored by Rob Gilson's avatar Rob Gilson

Merge pull request #397 from Fumon/foo

Added printing flag to get_jobs command list
parents 91080d14 182854b6
...@@ -354,7 +354,17 @@ class Prontserve(pronsole.pronsole, EventEmitter): ...@@ -354,7 +354,17 @@ class Prontserve(pronsole.pronsole, EventEmitter):
self.jobs.update(int(job_id), kwargs) self.jobs.update(int(job_id), kwargs)
def do_get_jobs(self): def do_get_jobs(self):
return {'jobs': self.jobs.public_list()} jobexport = []
if self.current_job != None:
jobexport.append(
dict(
id = self.current_job["id"],
file_name = self.current_job["file_name"],
printing = True
)
)
jobexport.extend(self.jobs.public_list())
return {'jobs': jobexport}
def run_print_queue_loop(self): def run_print_queue_loop(self):
# This is a polling work around to the current lack of events in printcore # This is a polling work around to the current lack of events in printcore
...@@ -469,6 +479,7 @@ class PrintJobQueue(EventEmitter): ...@@ -469,6 +479,7 @@ class PrintJobQueue(EventEmitter):
return dict( return dict(
id = job["id"], id = job["id"],
file_name = job["file_name"], file_name = job["file_name"],
printing = False,
) )
def add(self, file_name, body): def add(self, file_name, body):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment