| 1 | package edu.ucsb.cs156.happiercows.jobs; | |
| 2 | ||
| 3 | import org.springframework.beans.factory.annotation.Autowired; | |
| 4 | import org.springframework.stereotype.Service; | |
| 5 | ||
| 6 | import edu.ucsb.cs156.jobs.entities.Job; | |
| 7 | import edu.ucsb.cs156.happiercows.repositories.GameRepository; | |
| 8 | import edu.ucsb.cs156.happiercows.repositories.FarmerRepository; | |
| 9 | import edu.ucsb.cs156.happiercows.repositories.HerdRepository; | |
| 10 | import edu.ucsb.cs156.happiercows.repositories.UserRepository; | |
| 11 | import edu.ucsb.cs156.happiercows.services.GamePlusBuilderService; | |
| 12 | import edu.ucsb.cs156.jobs.services.JobContextConsumer; | |
| 13 | import lombok.extern.slf4j.Slf4j; | |
| 14 | ||
| 15 | @Service | |
| 16 | @Slf4j | |
| 17 | public class UpdateCowHealthJobFactoryInd { | |
| 18 | ||
| 19 | @Autowired | |
| 20 | private GameRepository gameRepository; | |
| 21 | | |
| 22 | @Autowired | |
| 23 | private FarmerRepository farmerRepository; | |
| 24 | ||
| 25 | @Autowired | |
| 26 | private UserRepository userRepository; | |
| 27 | ||
| 28 | @Autowired | |
| 29 | private GamePlusBuilderService gamePlusBuilderService; | |
| 30 | ||
| 31 | @Autowired | |
| 32 | private HerdRepository herdRepository; | |
| 33 | ||
| 34 | public JobContextConsumer create(Long gameID) { | |
| 35 | log.info("gameRepository = " + gameRepository); | |
| 36 | log.info("farmerRepository = " + farmerRepository); | |
| 37 |
1
1. create : replaced return value with null for edu/ucsb/cs156/happiercows/jobs/UpdateCowHealthJobFactoryInd::create → KILLED |
return new UpdateCowHealthJobInd(gameRepository, farmerRepository, userRepository, gamePlusBuilderService, herdRepository, Math::random, gameID); |
| 38 | } | |
| 39 | } | |
Mutations | ||
| 37 |
1.1 |