Skip to content

Commit

Permalink
feat: 스케줄링을 profile에 따라 분리한다 (#334)
Browse files Browse the repository at this point in the history
* feat: 스케줄링을 production 서버에만 사용하도록 변경

[#333]

* feat: 처음 scrap을 production 서버에만 사용하도록 변경

[#333]

* feat: 처음 scrap을 production 서버에만 사용하도록 변경

[#333]

* feat: scheduling 분리

[#333]
  • Loading branch information
drunkenhw authored Aug 3, 2023
1 parent 2d85179 commit 32692d0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package com.carffeine.carffeine.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;

@ConditionalOnProperty(name = "scheduling.enabled", havingValue = "true")
@EnableScheduling
@Component
public class SchedulingConfig {
Expand Down
6 changes: 6 additions & 0 deletions backend/src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ spring:
hibernate:
ddl-auto: update
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect

initialize-charge:
enabled: false

scheduling:
enabled: false
11 changes: 5 additions & 6 deletions backend/src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
spring:

datasource:
url: jdbc:mysql://localhost:13306/charge?useSSL=false&serverTimezone=UTC&useUnicode=true&characterEncoding=utf8&allowPublicKeyRetrieval=true
username: root
Expand All @@ -10,9 +9,9 @@ spring:
hibernate:
ddl-auto: update
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect
properties:
hibernate:
show_sql: true
format_sql: true
use_sql_comments: true

initialize-charge:
enabled: false

scheduling:
enabled: true
6 changes: 6 additions & 0 deletions backend/src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ spring:
hibernate:
ddl-auto: update
database-platform: org.hibernate.dialect.MySQL5InnoDBDialect

initialize-charge:
enabled: true

scheduling:
enabled: true
3 changes: 0 additions & 3 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ api:
service_key:
ENC(EnFwYm2ZuLwCTIgLIiqtqqw+IdtZ4UNb2GiNWl9s46gDk2SaEu7U5XfJuijkLufufXbUwIaSsCAiG3UpbtamTRwXvebdQDHLo6Y7lPRQ4L3d+Q2m24E/Btg83V68kCu9RFpzf/6/3u+6Wl961HeZiIDdL255xcbkZlKxWy4jVELkONxUWz9awzQuJw2CwsNv4WkK5TMk4gxQTh8ZJUDyQEqmUgGtLcH+edtOnFu9IIjgLX3CvCe+7Kxv4WtP3nRlGsg+/Xbxck6mmoqdqXWppeXF0zVBOwsnr4vtWRGM/1PD6rJvQN9hnWQmW0IE3x5NDM/usDkdBMhBDmtbtpmxibbXTSc58A/idDOcUwlZrbLx89OppXNcIDYIn6iMyf3Fo6/sYMSt1YJqC1WxlkKjLqs69bZtjF5TkBHFOneAV4vHo8/2g0V/FauNYPry2FULsbgeAO2w1K1OTey+pa4DjXoLmhmfK6VEFlf2NJhAlqTPDJakfwtb8yheLVuRIqtyBaMwWtrzYdON4G/d03vvjGskqP/h5UXGwkJGpS6u+Gdcxjvs2/IfB1FO1dNA2QTr7m2wWcyAaIG6MrUtZM9Hp5qu7VvqCnK8TNrhBUoqLA1fNs6Xy6kVYhOMXqer1sGs6svoFOuu2zIPUmb+OcKWTQv9d/HgcrFtJrP/gmkYsdOUDpKCWqzIjz6KvSui3cbIAlPTgpJsbN/yTe9RU10D8kGSDcXcR75W+LtRj4Xl1Vd33ElMZ5brCdAy7dPyFo0jcUH7AWa713HTmUk6ZH0BLoeyW8tAbKpI/vUR0mbIxx7JWAFQ4hok5f4xkoXbCGoQtSvZUI8ZB9A=)

initialize-charge:
enabled: true

management:
endpoints:
web:
Expand Down

0 comments on commit 32692d0

Please sign in to comment.