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

CLAP-390 종료에서 완료로 상태변경시 종료일 초기화 되는 문제 수정 #506

Merged
merged 2 commits into from
Feb 12, 2025
Merged
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
5 changes: 2 additions & 3 deletions src/main/java/clap/server/domain/model/task/Task.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,9 @@ public void finalSave(int attachmentCount) {
}

public void updateTaskStatus(TaskStatus status) {
if (status.equals(TaskStatus.COMPLETED)) {
if (TaskStatus.COMPLETED.equals(status)) {
this.finishedAt = LocalDateTime.now();
}
if (this.taskStatus == TaskStatus.TERMINATED || this.taskStatus == TaskStatus.COMPLETED) {
} else if (TaskStatus.TERMINATED.equals(this.taskStatus) || TaskStatus.COMPLETED.equals(this.taskStatus)) {
this.finishedAt = null;
}
this.taskStatus = status;
Expand Down
34 changes: 11 additions & 23 deletions src/main/resources/mysql.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
spring:
jpa:
hibernate:
ddl-auto: update
properties:
hibernate:
default_batch_fetch_size: 100
# format_sql: true
show_sql: true

datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://${DATABASE_HOST:localhost}:${DATABASE_PORT:3306}/${DATABASE_NAME:taskflow}?characterEncoding=UTF-8&serverTimezone=Asia/Seoul&autoReconnect=true
username: ${DATABASE_USERNAME}
password: ${DATABASE_PASSWORD}
data-source-properties:
rewrite-batched-statements: true

---
spring.config.activate.on-profile: local
Expand All @@ -29,11 +18,12 @@ spring:
open-in-view: false
generate-ddl: false
hibernate:
ddl-auto: none
show-sql: true
ddl-auto: validate
properties:
hibernate:
dialect: org.hibernate.dialect.MySQLDialect
default_batch_fetch_size: 100
format_sql: true
show_sql: true

logging:
level:
Expand All @@ -57,11 +47,10 @@ spring:
generate-ddl: false
hibernate:
ddl-auto: validate
show-sql: true
properties:
hibernate:
dialect: org.hibernate.dialect.MySQLDialect

format_sql: false
show_sql: true
flyway:
enabled: true
baseline-on-migrate: true
Expand All @@ -76,13 +65,12 @@ spring:
open-in-view: false
generate-ddl: false
hibernate:
ddl-auto: none
show-sql: true
ddl-auto: validate
properties:
hibernate:
dialect: org.hibernate.dialect.MySQLDialect

format_sql: false
show_sql: false
flyway:
enabled: false
baseline-on-migrate: true
locations: classpath:db/migration/prod
baseline-on-migrate: false
locations: classpath:db/migration/prod