@@ -167,48 +167,47 @@ public function handleAction(Request $request, ?Profiler $profiler, int $errorId
167167 flush ();
168168 };
169169 return $ this ->streamResponse ($ this ->requestStack , function () use ($ progressReporter , $ internalError ) {
170- $ this ->em ->wrapInTransaction (function () use ($ progressReporter , $ internalError ) {
171- $ internalError ->setStatus (InternalErrorStatusType::STATUS_RESOLVED );
172- $ this ->dj ->setInternalError (
173- $ internalError ->getDisabled (),
174- $ internalError ->getContest (),
175- true
176- );
177-
178- $ this ->dj ->auditlog ('internal_error ' , $ internalError ->getErrorid (),
179- sprintf ('internal error: %s ' , InternalErrorStatusType::STATUS_RESOLVED ));
180-
181- $ affectedJudgings = $ internalError ->getAffectedJudgings ();
182- if (!$ affectedJudgings ->isEmpty ()) {
183- $ skipped = [];
184- $ rejudging = $ this ->rejudgingService ->createRejudging (
185- 'Internal Error ' . $ internalError ->getErrorid () . ' resolved ' ,
186- JudgeTask::PRIORITY_DEFAULT ,
187- $ affectedJudgings ->getValues (),
188- false ,
189- 0 ,
190- 0 ,
191- null ,
192- $ skipped ,
193- $ progressReporter );
194- if ($ rejudging === null ) {
195- $ this ->addFlash ('warning ' , 'All submissions that are affected by this internal error are already part of another rejudging. ' );
196- } else {
197- $ rejudgingUrl = $ this ->generateUrl ('jury_rejudging ' , ['rejudgingId ' => $ rejudging ->getRejudgingid ()]);
198- $ internalErrorUrl = $ this ->generateUrl ('jury_internal_error ' , ['errorId ' => $ internalError ->getErrorid ()]);
199- $ message = sprintf (
200- 'Rejudging <a href="%s">r%d</a> created for internal error <a href="%s">%d</a>. ' ,
201- $ rejudgingUrl ,
202- $ rejudging ->getRejudgingid (),
203- $ internalErrorUrl ,
204- $ internalError ->getErrorid ()
205- );
206- $ progressReporter (100 , '' , $ message );
207- }
170+ $ internalError ->setStatus (InternalErrorStatusType::STATUS_RESOLVED );
171+ $ this ->dj ->setInternalError (
172+ $ internalError ->getDisabled (),
173+ $ internalError ->getContest (),
174+ true
175+ );
176+ $ this ->em ->flush ();
177+
178+ $ this ->dj ->auditlog ('internal_error ' , $ internalError ->getErrorid (),
179+ sprintf ('internal error: %s ' , InternalErrorStatusType::STATUS_RESOLVED ));
180+
181+ $ affectedJudgings = $ internalError ->getAffectedJudgings ();
182+ if (!$ affectedJudgings ->isEmpty ()) {
183+ $ skipped = [];
184+ $ rejudging = $ this ->rejudgingService ->createRejudging (
185+ 'Internal Error ' . $ internalError ->getErrorid () . ' resolved ' ,
186+ JudgeTask::PRIORITY_DEFAULT ,
187+ $ affectedJudgings ->getValues (),
188+ false ,
189+ 0 ,
190+ 0 ,
191+ null ,
192+ $ skipped ,
193+ $ progressReporter );
194+ if ($ rejudging === null ) {
195+ $ this ->addFlash ('warning ' , 'All submissions that are affected by this internal error are already part of another rejudging. ' );
208196 } else {
209- $ progressReporter (100 , '' , 'No affected judgings. ' );
197+ $ rejudgingUrl = $ this ->generateUrl ('jury_rejudging ' , ['rejudgingId ' => $ rejudging ->getRejudgingid ()]);
198+ $ internalErrorUrl = $ this ->generateUrl ('jury_internal_error ' , ['errorId ' => $ internalError ->getErrorid ()]);
199+ $ message = sprintf (
200+ 'Rejudging <a href="%s">r%d</a> created for internal error <a href="%s">%d</a>. ' ,
201+ $ rejudgingUrl ,
202+ $ rejudging ->getRejudgingid (),
203+ $ internalErrorUrl ,
204+ $ internalError ->getErrorid ()
205+ );
206+ $ progressReporter (100 , '' , $ message );
210207 }
211- });
208+ } else {
209+ $ progressReporter (100 , '' , 'No affected judgings. ' );
210+ }
212211 });
213212 }
214213
0 commit comments