Skip to content

Commit

Permalink
fix: server style
Browse files Browse the repository at this point in the history
  • Loading branch information
kaancayli committed Nov 17, 2024
1 parent a76ca2c commit 4b94af7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ public List<PyrisVariantDTO> getOfferedVariants(IrisSubSettingsType feature) thr
* @param feature The feature name of the pipeline to execute
* @param variant The variant of the feature to execute
* @param executionDTO The DTO sent as a body for the execution
* @param event The event to be sent as a query parameter, if the pipeline is getting executed due to an event
*/
public void executePipeline(String feature, String variant, Object executionDTO, Optional<String> event) {
var endpoint = "/api/v1/pipelines/" + feature + "/" + variant + "/run";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public PyrisPipelineService(PyrisConnectorService pyrisConnectorService, PyrisJo
*
* @param name the name of the pipeline to be executed
* @param variant the variant of the pipeline
* @param event an optional event variant that can be used to trigger specific event of the given pipeline
* @param jobToken a unique job token for tracking the pipeline execution
* @param dtoMapper a function to create the concrete DTO type for this pipeline from the base DTO
* @param statusUpdater a consumer to update the status of the pipeline execution
Expand Down Expand Up @@ -142,6 +143,7 @@ public void executePipeline(String name, String variant, Optional<String> event,
* @param latestSubmission the latest submission of the student
* @param exercise the programming exercise
* @param session the chat session
* @param eventVariant if this function triggers a pipeline execution due to a specific event, this is the used event variant
* @see PyrisPipelineService#executePipeline for more details on the pipeline execution process.
*/
public void executeExerciseChatPipeline(String variant, Optional<ProgrammingSubmission> latestSubmission, ProgrammingExercise exercise, IrisExerciseChatSession session,
Expand Down Expand Up @@ -188,7 +190,7 @@ private <T, U> void executeCourseChatPipeline(String variant, IrisCourseChatSess
var studentId = session.getUser().getId();
executePipeline("course-chat", variant, eventVariant, pyrisJobService.addCourseChatJob(courseId, session.getId()), executionDto -> {
var fullCourse = loadCourseWithParticipationOfStudent(courseId, studentId);
return new PyrisCourseChatPipelineExecutionDTO(PyrisExtendedCourseDTO.of(fullCourse),
return new PyrisCourseChatPipelineExecutionDTO<>(PyrisExtendedCourseDTO.of(fullCourse),
learningMetricsService.getStudentCourseMetrics(session.getUser().getId(), courseId), generateEventPayloadFromObjectType(eventDtoClass, eventObject),
pyrisDTOService.toPyrisMessageDTOList(session.getMessages()), new PyrisUserDTO(session.getUser()), executionDto.settings(), // flatten the execution dto here
executionDto.initialStages());
Expand Down

0 comments on commit 4b94af7

Please sign in to comment.