Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

main #412

Merged
merged 5 commits into from
Nov 21, 2024
Merged

main #412

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading