Updoot
This commit is contained in:
parent
064137a26e
commit
2e53d2e398
1 changed files with 3 additions and 3 deletions
|
|
@ -31,7 +31,7 @@ class Job:
|
||||||
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
fer = Fernet(env["key"])
|
fer = Fernet(env["SECRET"])
|
||||||
|
|
||||||
|
|
||||||
manager = Manager()
|
manager = Manager()
|
||||||
|
|
@ -76,7 +76,7 @@ def save():
|
||||||
"""Saves the current application state to an encrypted file"""
|
"""Saves the current application state to an encrypted file"""
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
"jobs": [asdict(x) for x in active_jobs] + [asdict(x) for x in jobs],
|
"jobs": [asdict(x) for x in jobs],
|
||||||
"completed": dict(completed),
|
"completed": dict(completed),
|
||||||
}
|
}
|
||||||
with open("./state.dat", "wb") as handle:
|
with open("./state.dat", "wb") as handle:
|
||||||
|
|
@ -169,6 +169,6 @@ load()
|
||||||
proc = Process(target=job_processor)
|
proc = Process(target=job_processor)
|
||||||
proc.start()
|
proc.start()
|
||||||
|
|
||||||
app.run("0.0.0.0", 3000)
|
app.run("0.0.0.0", env["PORT"] if "PORT" in env else 3000)
|
||||||
proc.join()
|
proc.join()
|
||||||
save()
|
save()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue