Skip to content

Commit afa2c59

Browse files
committed
added multiprocessing to model retraining function
1 parent 6417f36 commit afa2c59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Backend/app.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# =============================================================
44
# package imports
55
import pipelining
6+
import multiprocessing
67
from flask import Flask, request, jsonify
78
from flask_cors import CORS
89
from flask_sqlalchemy import SQLAlchemy
@@ -298,7 +299,8 @@ def should_call_retrain():
298299
global counter_filename
299300
status = check_counter(counter_filename)
300301
if(status):
301-
call_to_retraining_function()
302+
p1 = multiprocessing.Process(target=call_to_retraining_function)
303+
p1.start()
302304
reset_counter(counter_filename)
303305
else:
304306
update_counter(counter_filename)

0 commit comments

Comments
 (0)