Skip to content
Snippets Groups Projects
Commit 42607fd4 authored by Vermaat's avatar Vermaat
Browse files

Close the database transaction when the batch daemon is idle

parent 3a90ba40
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ import sys
import time
from .. import config
from .. import db
from .. import Scheduler
......@@ -36,6 +37,8 @@ def process():
while True:
# Process batch jobs.
scheduler.process()
db.session.remove()
if scheduler.stopped():
break
# Wait a bit and process any possible new jobs.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment