aboutsummaryrefslogtreecommitdiff
path: root/modules/shared.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/shared.py')
-rw-r--r--modules/shared.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py
index fb84afd8..0f4c035d 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -147,6 +147,19 @@ class State:
def get_job_timestamp(self):
return datetime.datetime.now().strftime("%Y%m%d%H%M%S") # shouldn't this return job_timestamp?
+ def js(self):
+ obj = {
+ "skipped": self.skipped,
+ "interrupted": self.skipped,
+ "job": self.job,
+ "job_count": self.job_count,
+ "job_no": self.job_no,
+ "sampling_step": self.sampling_step,
+ "sampling_steps": self.sampling_steps,
+ }
+
+ return json.dumps(obj)
+
state = State()