fix active
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user