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