| 1 | package edu.ucsb.cs156.frontiers.jobs; | |
| 2 | ||
| 3 | import edu.ucsb.cs156.frontiers.entities.DownloadRequest; | |
| 4 | import edu.ucsb.cs156.frontiers.services.GithubGraphQLService; | |
| 5 | import edu.ucsb.cs156.jobs.services.JobContext; | |
| 6 | import edu.ucsb.cs156.jobs.services.JobContextConsumer; | |
| 7 | import lombok.Builder; | |
| 8 | import lombok.EqualsAndHashCode; | |
| 9 | ||
| 10 | @Builder | |
| 11 | @EqualsAndHashCode | |
| 12 | public class CommitDownloadRequestJob implements JobContextConsumer { | |
| 13 | ||
| 14 | GithubGraphQLService githubService; | |
| 15 | DownloadRequest request; | |
| 16 | ||
| 17 | @Override | |
| 18 | public String getScopeType() { | |
| 19 |
1
1. getScopeType : replaced return value with "" for edu/ucsb/cs156/frontiers/jobs/CommitDownloadRequestJob::getScopeType → KILLED |
return "course"; |
| 20 | } | |
| 21 | ||
| 22 | @Override | |
| 23 | public Long getScopeId() { | |
| 24 |
1
1. getScopeId : replaced Long return value with 0L for edu/ucsb/cs156/frontiers/jobs/CommitDownloadRequestJob::getScopeId → KILLED |
return request.getCourse().getId(); |
| 25 | } | |
| 26 | ||
| 27 | @Override | |
| 28 | public void accept(JobContext c) throws Exception { | |
| 29 |
1
1. accept : removed call to edu/ucsb/cs156/jobs/services/JobContext::log → KILLED |
c.log("Starting download for course " + request.getCourse().getCourseName()); |
| 30 |
1
1. accept : removed call to edu/ucsb/cs156/frontiers/services/GithubGraphQLService::downloadCommitHistory → KILLED |
githubService.downloadCommitHistory(request); |
| 31 |
1
1. accept : removed call to edu/ucsb/cs156/jobs/services/JobContext::log → KILLED |
c.log("Download completed successfully"); |
| 32 | } | |
| 33 | } | |
Mutations | ||
| 19 |
1.1 |
|
| 24 |
1.1 |
|
| 29 |
1.1 |
|
| 30 |
1.1 |
|
| 31 |
1.1 |