Skip to content
Snippets Groups Projects
Commit 9e883304 authored by Stephan Porada's avatar Stephan Porada :speech_balloon:
Browse files

Remove unecessary sessions

parent bb687840
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ from time import sleep ...@@ -6,6 +6,7 @@ from time import sleep
# TODO: Check if thread is still alive and execute next thread after that # TODO: Check if thread is still alive and execute next thread after that
# TODO: Remove unnecessary commits # TODO: Remove unnecessary commits
# TODO: Check line length
# check_jobs_thread = None # check_jobs_thread = None
# check_corpora_thread = None # check_corpora_thread = None
# notify_thread = None # notify_thread = None
......
...@@ -104,7 +104,6 @@ def __create_job_service(job): ...@@ -104,7 +104,6 @@ def __create_job_service(job):
def __checkout_job_service(job, scoped_session): def __checkout_job_service(job, scoped_session):
logger = init_logger() logger = init_logger()
scoped_session = Session()
service_name = 'job_{}'.format(job.id) service_name = 'job_{}'.format(job.id)
try: try:
service = docker_client.services.get(service_name) service = docker_client.services.get(service_name)
...@@ -136,7 +135,6 @@ def __checkout_job_service(job, scoped_session): ...@@ -136,7 +135,6 @@ def __checkout_job_service(job, scoped_session):
job_result = JobResult(dir=results_dir, filename=result, job_result = JobResult(dir=results_dir, filename=result,
job_id=job.id) job_id=job.id)
scoped_session.add(job_result) scoped_session.add(job_result)
scoped_session.commit()
def __remove_job_service(job): def __remove_job_service(job):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment