mirror of
https://github.com/bytedream/untisbot-discord.git
synced 2025-05-09 20:25:09 +02:00
Bugfix for non sql user
This commit is contained in:
parent
cc7e1e4999
commit
bc3f6514d7
@ -74,16 +74,18 @@ public class DiscordCommandListener extends ListenerAdapter {
|
|||||||
statsDataConnector = dataConnector.statsConnector();
|
statsDataConnector = dataConnector.statsConnector();
|
||||||
this.languages = languages;
|
this.languages = languages;
|
||||||
|
|
||||||
new Timer().scheduleAtFixedRate(new TimerTask() { // just execute this so that the connect won't have a timeout
|
if (storeType == StoreType.MARIADB) {
|
||||||
@Override
|
new Timer().scheduleAtFixedRate(new TimerTask() { // just execute this so that the connect won't have a timeout
|
||||||
public void run() {
|
@Override
|
||||||
Thread.currentThread().setName("Anti sql timeout");
|
public void run() {
|
||||||
try {
|
Thread.currentThread().setName("Anti sql timeout");
|
||||||
Main.getConnection().createStatement().execute("SELECT * FROM Guilds WHERE GUILDID = 0");
|
try {
|
||||||
} catch (SQLException ignore) {
|
Main.getConnection().createStatement().execute("SELECT * FROM Guilds WHERE GUILDID = 0");
|
||||||
|
} catch (SQLException ignore) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}, 0, TimeUnit.HOURS.toMillis(1));
|
||||||
}, 0, TimeUnit.HOURS.toMillis(1));
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user