@@ -123,15 +123,18 @@ async def _handle_submission(
123
123
Returns:
124
124
if successful, returns the result of the run.
125
125
"""
126
- thread_name = f"{ self .name } - { mode .value .capitalize ()} Job"
127
-
128
126
script_content = await self ._validate_input_file (interaction , script )
129
127
if script_content is None :
130
128
return None
131
129
132
130
# TODO figure out the correct way to handle messaging here
133
131
if mode != SubmissionMode .PRIVATE :
134
- thread = await self .bot .create_thread (interaction , gpu_type .name , f"{ thread_name } " )
132
+ thread = await interaction .channel .create_thread (
133
+ name = f"{ script .filename } on { gpu_type .name } ({ self .name } )" ,
134
+ type = discord .ChannelType .private_thread ,
135
+ auto_archive_duration = 1440 ,
136
+ )
137
+ await thread .add_tags (interaction .user )
135
138
config = build_task_config (
136
139
task = task , submission_content = script_content , arch = self ._get_arch (gpu_type ), mode = mode
137
140
)
@@ -155,6 +158,7 @@ async def _handle_submission(
155
158
156
159
try :
157
160
await generate_report (thread , result .runs )
161
+ await reporter .push (f"See results at { thread .jump_url } " )
158
162
except Exception as E :
159
163
logger .error ("Error generating report. Result: %s" , result , exc_info = E )
160
164
raise
0 commit comments