Skip to content

Commit

Permalink
remove schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-khg committed Dec 17, 2023
1 parent 7fc24d6 commit d8485af
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import com.catcher.batch.core.service.MovieService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.HashMap;
Expand All @@ -22,7 +21,6 @@ public class MovieApiAdapter implements ApiService<Void> {
private final MovieService movieService;

@Override
@Scheduled(cron = "0 0 1 * * *", zone = "Asia/Seoul")
public Void getData() {
HashMap<String, Object> params = new HashMap<>();
MovieApiResponse response = catcherFeignService.parseService(params, MovieApiResponse.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class CampingController {

private final ApiService apiService;

@PostMapping("/batch")
@GetMapping("/batch")
public CommonResponse<Object> batchCampingData() {
apiService.getData();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public class DBConnectionController {
private final CategoryJpaRepository categoryRepository;

@GetMapping
@Scheduled(fixedDelay = 180000L)
public String category() {
Category category = categoryRepository.findById(2L).orElse(null);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.catcher.batch.common.response.CommonResponse;
import com.catcher.batch.core.service.ApiService;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -16,7 +17,7 @@ public class RestaurantController {

private final ApiService apiService;

@PostMapping("/batch")
@GetMapping("/batch")
public CommonResponse<Object> batchRestaurantData() {
apiService.getData();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.catcher.batch.common.response.CommonResponse;
import com.catcher.batch.core.service.ApiService;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
Expand All @@ -16,7 +17,7 @@ public class ShoppingController {

private final ApiService apiService;

@PostMapping("/batch")
@GetMapping("/batch")
public CommonResponse<Object> batchShoppingData() {
apiService.getData();

Expand Down

0 comments on commit d8485af

Please sign in to comment.