Skip to content

Commit

Permalink
refactor: OpenApi baseTime 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seheonnn committed Jul 1, 2024
1 parent b3db115 commit 51485e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public class DailyWeatherTasklet implements Tasklet {
private final WeatherService weatherService;

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
LocalDateTime now = LocalDateTime.now();
String[] dateTime = weatherService.convertLocalDateTimeToString(now).split("_");
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
LocalDateTime baseTime = LocalDateTime.now().minusHours(1);
String[] dateTime = weatherService.convertLocalDateTimeToString(baseTime).split("_");
List<Region> regionList = weatherService.getRegionList();
regionList.stream()
.forEach(region -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public class ExpectedWeatherTasklet implements Tasklet {
private final WeatherService weatherService;

@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
LocalDateTime now = LocalDateTime.now();
String[] dateTime = weatherService.convertLocalDateTimeToString(now).split("_");
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) {
LocalDateTime baseTime = LocalDateTime.now().minusHours(1);
String[] dateTime = weatherService.convertLocalDateTimeToString(baseTime).split("_");
List<Region> regionList = weatherService.getRegionList();
regionList.stream()
.forEach(region -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ public String convertLocalDateToString(LocalDate localDate) {
return localDate.format(formatter);
}

// TODO AccuWeather 대기 정보로 변경 예정
public List<AirKoreaOpenApiResponse.Items> callAirKorea(String searchDate) throws URISyntaxException {
int pageNo = 1;
int numOfRows = 10;
Expand Down

0 comments on commit 51485e5

Please sign in to comment.