Skip to content

Commit

Permalink
fix: ensure ttl is always at least 120s
Browse files Browse the repository at this point in the history
  • Loading branch information
db0 committed Oct 5, 2024
1 parent ea2d840 commit f36b6a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions horde/classes/stable/processing_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ def set_job_ttl(self):
# Using this formula, a 1536x768x40 request is expected to take ~50s on a 1mps/s worker, but we will only time out after 390s.
ttl_multiplier = (self.wp.width * self.wp.height) / (512 * 512)
self.job_ttl = 30 + (self.wp.get_accurate_steps() * 2 * ttl_multiplier)
if self.job_ttl < 120:
self.job_ttl = 120
# CN is 3 times slower
if self.wp.gen_payload.get("control_type"):
self.job_ttl = self.job_ttl * 2
Expand Down

0 comments on commit f36b6a5

Please sign in to comment.