Skip to content

Commit 1699110

Browse files
committed
fix drum
1 parent b7ff12a commit 1699110

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

custom_model_runner/datarobot_drum/drum/entry_point.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
11
from datarobot_drum.drum.gunicorn.run_gunicorn import main_gunicorn
22
from datarobot_drum.drum.main import main
3-
import sys
43
from datarobot_drum import RuntimeParameters
4+
from datarobot_drum.drum.utils.setup import setup_options
55

66

77
def run_drum_server():
8-
cmd_args = sys.argv
9-
is_server = False
10-
if len(cmd_args) > 1 and cmd_args[1] == "server":
11-
is_server = True
12-
8+
options = setup_options()
139
if (
14-
RuntimeParameters.has("DRUM_SERVER_TYPE")
10+
options.subparser_name == "server"
11+
and RuntimeParameters.has("DRUM_SERVER_TYPE")
1512
and str(RuntimeParameters.get("DRUM_SERVER_TYPE")).lower() == "gunicorn"
16-
and is_server
1713
):
1814
main_gunicorn()
1915
else:

0 commit comments

Comments
 (0)