final cleanup for tue
This commit is contained in:
parent
3ce63bf91c
commit
052e7c5793
2 changed files with 4 additions and 2 deletions
|
@ -8,6 +8,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import static com.sap.tamagotchi.service.TamagotchiService.DEVICE_EVENT_PROCESSOR_SCHEDULE;
|
||||
|
||||
@Service
|
||||
public class Owner {
|
||||
|
||||
|
@ -18,7 +20,7 @@ public class Owner {
|
|||
this.tamagotchiService = tamagotchiService;
|
||||
}
|
||||
|
||||
@Scheduled(fixedDelay = 5000)
|
||||
@Scheduled(fixedDelay = DEVICE_EVENT_PROCESSOR_SCHEDULE)
|
||||
public void setData() {
|
||||
for (Device d : tamagotchiService.getDevices()) {
|
||||
double random = Math.random();
|
||||
|
|
|
@ -22,7 +22,7 @@ import com.sap.tamagotchi.publisher.PublisherService;
|
|||
@EnableScheduling
|
||||
public class TamagotchiService {
|
||||
|
||||
private static final long DEVICE_EVENT_PROCESSOR_SCHEDULE = 5000;
|
||||
public static final long DEVICE_EVENT_PROCESSOR_SCHEDULE = 5000;
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue