mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-23 19:25:12 +01:00
Increased the minimum time between connections to the GH API to 60 minutes
This commit is contained in:
parent
64d89f9ca9
commit
563465ad14
@ -191,10 +191,10 @@ public class Settings implements ConfigObject {
|
||||
|
||||
@ConfigComment("Time in minutes between each connection to the GitHub API.")
|
||||
@ConfigComment("This allows for up-to-the-minute information gathering.")
|
||||
@ConfigComment("However, as the GitHub API data does not get updated instantly, this value cannot be set less than 15 minutes.")
|
||||
@ConfigComment("However, as the GitHub API data does not get updated instantly, this value cannot be set to less than 60 minutes.")
|
||||
@ConfigComment("Setting this to 0 will make BentoBox download data only at startup.")
|
||||
@ConfigEntry(path = "web.github.connection-interval", since = "1.5.0")
|
||||
private int githubConnectionInterval = 60;
|
||||
private int githubConnectionInterval = 120;
|
||||
|
||||
@ConfigEntry(path = "web.updater.check-updates.bentobox", since = "1.3.0", hidden = true)
|
||||
private boolean checkBentoBoxUpdates = true;
|
||||
|
@ -44,8 +44,8 @@ public class WebManager {
|
||||
// If below 0, it means we shouldn't run this as a repeating task.
|
||||
plugin.getServer().getScheduler().runTaskLaterAsynchronously(plugin, () -> requestGitHubData(true), 20L);
|
||||
} else {
|
||||
// Set connection interval to be at least 15 minutes.
|
||||
connectionInterval = Math.max(connectionInterval, 15 * 20 * 60L);
|
||||
// Set connection interval to be at least 60 minutes.
|
||||
connectionInterval = Math.max(connectionInterval, 60 * 20 * 60L);
|
||||
plugin.getServer().getScheduler().runTaskTimerAsynchronously(plugin, () -> requestGitHubData(true), 20L, connectionInterval);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user