File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change
1
+ import logging
1
2
import os
2
3
3
4
from typing import Union
65
66
JUDGE0_IMPLICIT_CE_CLIENT = None
66
67
JUDGE0_IMPLICIT_EXTRA_CE_CLIENT = None
67
68
69
+ logger = logging .getLogger (__name__ )
70
+
68
71
69
72
def _get_implicit_client (flavor : Flavor ) -> Client :
70
73
global JUDGE0_IMPLICIT_CE_CLIENT , JUDGE0_IMPLICIT_EXTRA_CE_CLIENT
@@ -104,6 +107,12 @@ def _get_implicit_client(flavor: Flavor) -> Client:
104
107
105
108
106
109
def _get_preview_client (flavor : Flavor ) -> Union [SuluJudge0CE , SuluJudge0ExtraCE ]:
110
+ logger .warning (
111
+ "You are using a preview version of the client which is not recommended"
112
+ " for production.\n "
113
+ "For production, please specify your API key in the environment variable."
114
+ )
115
+
107
116
if flavor == Flavor .CE :
108
117
return SuluJudge0CE (retry_strategy = RegularPeriodRetry (0.5 ))
109
118
else :
You can’t perform that action at this time.
0 commit comments