fix active
This commit is contained in:
parent
517b604768
commit
83b21eee5c
@ -177,6 +177,8 @@ public class JukeboxManager implements SmartInitializingSingleton {
|
||||
*/
|
||||
public JsonElement getStatus() {
|
||||
if (!checkToken()) {
|
||||
config.setActive(false);
|
||||
systemPropertyManager.set(ACTIVE, String.valueOf(config.isActive()));
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -211,7 +213,7 @@ public class JukeboxManager implements SmartInitializingSingleton {
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
if (config.isActive()) {
|
||||
config.setActive(false);
|
||||
systemPropertyManager.set(ACTIVE, String.valueOf(config.isActive()));
|
||||
@ -277,9 +279,11 @@ public class JukeboxManager implements SmartInitializingSingleton {
|
||||
/**
|
||||
* Check active.
|
||||
*/
|
||||
@Scheduled(cron = "${we.bstly.jukebox.cron:0 */5 0 * * * }")
|
||||
@Scheduled(cron = "${we.bstly.jukebox.cron:0 */5 * * * * }")
|
||||
public void checkActive() {
|
||||
getStatus();
|
||||
if (config.isActive()) {
|
||||
getStatus();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user