Skip to content

Commit

Permalink
Merge pull request #412 from twenty-three-23/dev
Browse files Browse the repository at this point in the history
main
  • Loading branch information
ch8930 authored Nov 21, 2024
2 parents 601b036 + 5a0a95b commit 30eaf15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,6 @@ jobs:
sudo docker pull ${{ secrets.DOCKERHUB_USERNAME }}/github-actions-demo
sudo docker stop $(sudo docker ps -q) 2>/dev/null || true
sudo docker run --name github-actions-demo --rm -v logs:/logs -d -p 8080:8080 ${{ secrets.DOCKERHUB_USERNAME }}/github-actions-demo
sudo chmode logs 777
sudo chmod logs 777
sudo docker system prune -f
EOF
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.twentythree.peech.paragraph.infrastructure;

import com.twentythree.peech.common.utils.ScriptUtils;
import com.twentythree.peech.paragraph.domain.ParagraphFetcher;
import com.twentythree.peech.paragraph.domain.ParagraphsDomain;
import com.twentythree.peech.paragraph.domain.ParagraphsInformationDomain;
Expand All @@ -17,6 +16,8 @@
import java.util.Comparator;
import java.util.List;

import static com.twentythree.peech.common.utils.ScriptUtils.sumLocalTime;

@RequiredArgsConstructor
@Transactional(readOnly = true)
@Component
Expand Down Expand Up @@ -79,6 +80,8 @@ public ParagraphsInformationDomain fetchParagraphsInformation(Long scriptId) {
if (latestParagraphOrder == null) {
latestParagraphOrder = paragraphOrder;
paragraphContent = sentence.getSentenceContent();
expectedTimePerParagraph = sumLocalTime(expectedTimePerParagraph, sentence.getSentenceExpectTime());
realTimePerParagraph = sumLocalTime(realTimePerParagraph, sentence.getSentenceRealTime());
}
else if (paragraphOrder > latestParagraphOrder) {

Expand All @@ -88,8 +91,8 @@ else if (paragraphOrder > latestParagraphOrder) {
paragraphContent = sentence.getSentenceContent();
} else if (paragraphOrder.equals(latestParagraphOrder)) {
paragraphContent += sentence.getSentenceContent();
expectedTimePerParagraph = ScriptUtils.sumLocalTime(expectedTimePerParagraph, sentence.getSentenceExpectTime());
realTimePerParagraph = ScriptUtils.sumLocalTime(realTimePerParagraph, sentence.getSentenceRealTime());
expectedTimePerParagraph = sumLocalTime(expectedTimePerParagraph, sentence.getSentenceExpectTime());
realTimePerParagraph = sumLocalTime(realTimePerParagraph, sentence.getSentenceRealTime());
} else {
throw new RuntimeException("문단 도메인 생성중 알 수 없는 오류 발생");
}
Expand Down

0 comments on commit 30eaf15

Please sign in to comment.