diff --git a/templates/index.html b/templates/index.html
index b3a208c..b87b8ad 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -510,8 +510,8 @@
(response.jobs[i].img ? ("
") : "") +
"
" +
"- status: " + response.jobs[i].status + "
" +
- "- prompt: " + truncateText(response.jobs[i].prompt, 300) + "
" +
- "- neg prompt: " + truncateText(response.jobs[i].neg_prompt, 300) + "
" +
+ "- prompt: " + truncateText(response.jobs[i].prompt, 500) + "
" +
+ "- neg prompt: " + truncateText(response.jobs[i].neg_prompt, 500) + "
" +
"- seed: " + response.jobs[i].seed + "
" +
"- uuid: " + response.jobs[i].uuid + "
" +
"- w x h: " + response.jobs[i].width + " x " + response.jobs[i].height + "
" +
diff --git a/utilities/database.py b/utilities/database.py
index 2962fb2..6f9c396 100644
--- a/utilities/database.py
+++ b/utilities/database.py
@@ -129,7 +129,7 @@ class Database:
return result[0]
def get_random_jobs(self, limit_count=0) -> list:
- query = f"SELECT {', '.join(ANONYMOUS_KEYS)} FROM {HISTORY_TABLE_NAME} WHERE {KEY_JOB_STATUS} = '{VALUE_JOB_DONE}' AND RANDOM() <= .3 LIMIT {limit_count}"
+ query = f"SELECT {', '.join(ANONYMOUS_KEYS)} FROM {HISTORY_TABLE_NAME} WHERE {KEY_JOB_STATUS} = '{VALUE_JOB_DONE}' AND rowid IN (SELECT rowid FROM {HISTORY_TABLE_NAME} ORDER BY RANDOM() LIMIT {limit_count})"
# execute the query and return the results
c = self.get_cursor()