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

Refact: 내부 배치 스케줄제거 #53

Merged
merged 1 commit into from
Dec 17, 2023
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
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);
dev-khg marked this conversation as resolved.
Show resolved Hide resolved
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();

dev-khg marked this conversation as resolved.
Show resolved Hide resolved
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);

dev-khg marked this conversation as resolved.
Show resolved Hide resolved
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();

dev-khg marked this conversation as resolved.
Show resolved Hide resolved
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();

dev-khg marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Loading