Skip to content

Commit

Permalink
Refactor: 코드 리팩토링
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonseon12 committed Jan 18, 2024
1 parent 259280c commit d03f206
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,17 @@ private Set<Long> fetchJobIdList(JobSearchJobPosition jobPosition) {
while (fetchJobIds.size() < MAX_FETCH_JD_LIST_SIZE) {
WantedJobListResponse jobListResponse = fetchJobList(jobPosition, offset);

List<Long> jobIds = jobListResponse.getData().stream()
List<Long> jobIdList = jobListResponse.getData().stream()
.map(WantedJobListResponse.Data::getId)
.toList();

fetchJobIds.addAll(jobIds);
fetchJobIds.addAll(jobIdList);

if (jobIds.size() < MAX_FETCH_JD_LIST_OFFSET) {
offset += MAX_FETCH_JD_LIST_OFFSET;
} else {
if (jobIdList.size() < MAX_FETCH_JD_LIST_OFFSET) {
break;
}

offset += MAX_FETCH_JD_LIST_OFFSET;
}

return fetchJobIds;
Expand Down

0 comments on commit d03f206

Please sign in to comment.