Skip to content

Commit

Permalink
Merge pull request #90 from ecolabdata/fix/rq-job-timeout
Browse files Browse the repository at this point in the history
fix: Disable rq job timeout
  • Loading branch information
streino authored Nov 2, 2024
2 parents 7ab6839 + 979f010 commit ffc04b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions isomorphe/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@

app = Flask(__name__)
app.config["SECRET_KEY"] = os.getenv("FLASK_SECRET_KEY", "default-secret-key")
app.config["TRANSFORM_TIMEOUT"] = 3*60*60 # 3 hours
app.config["TRANSFORM_TTL"] = 60 * 60 * 24 * 7 * 30 * 2 # 2 months
app.config["MIGRATE_TIMEOUT"] = 3*60*60 # 3 hours
app.config["MIGRATE_TTL"] = 60 * 60 * 24 * 7 * 30 * 2 # 2 months
app.config["TRANSFORMATIONS_PATH"] = (
Path(os.getenv("TRANSFORMATIONS_PATH", ""))
Expand Down Expand Up @@ -137,6 +139,7 @@ def transform():
transformation,
selection,
transformation_params=transformation_params,
job_timeout=app.config["TRANSFORM_TIMEOUT"],
result_ttl=app.config["TRANSFORM_TTL"],
)
return redirect(url_for("transform_success", job_id=job.id))
Expand Down Expand Up @@ -244,6 +247,7 @@ def migrate(job_id: str):
transform_job.result,
overwrite=overwrite,
group=group,
job_timeout=app.config["MIGRATE_TIMEOUT"],
result_ttl=app.config["MIGRATE_TTL"],
transform_job_id=job_id,
)
Expand Down

0 comments on commit ffc04b5

Please sign in to comment.