File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
chris_backend/plugininstances/services Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 55
55
from django .utils import timezone
56
56
from django .conf import settings
57
57
from django .db .utils import IntegrityError
58
+ from rest_framework .authtoken .models import Token
58
59
59
60
from core .storage import connect_storage
60
61
from core .utils import json_zip2str
@@ -217,8 +218,11 @@ def _compute_env_vars(self):
217
218
username = plugin_inst .owner .username
218
219
email = plugin_inst .owner .email
219
220
221
+ token ,_ = Token .objects .get_or_create (user = plugin_inst .owner )
222
+
220
223
env = [f'CHRIS_JID={ job_id } ' , f'CHRIS_PLG_INST_ID={ plugin_inst .id } ' ,
221
- f'CHRIS_USER_USERNAME={ username } ' , f'CHRIS_USER_EMAIL={ email } ' ]
224
+ f'CHRIS_USER_USERNAME={ username } ' , f'CHRIS_USER_EMAIL={ email } ' ,
225
+ f'CHRIS_USER_TOKEN={ token .key } ' ]
222
226
223
227
if plugin_type != 'fs' :
224
228
prev_id = plugin_inst .previous .id
You can’t perform that action at this time.
0 commit comments