16 Commits

Author SHA1 Message Date
faaf3ead39 Update s4u/setup-maven-action action to v1.15.0 2024-10-05 17:00:54 +00:00
Lee
0bc614ce39 Merge pull request 'Update dependency com.influxdb:influxdb-client-java to v7.2.0' (#44) from renovate/com.influxdb-influxdb-client-java-7.x into master
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 2m36s
Reviewed-on: #44
2024-08-13 17:28:18 +00:00
Lee
499c54c8cf Merge pull request 'Update dependency io.sentry:sentry-spring-boot-starter-jakarta to v7.14.0' (#46) from renovate/io.sentry-sentry-spring-boot-starter-jakarta-7.x into master
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Has been cancelled
Reviewed-on: #46
2024-08-13 17:28:09 +00:00
Lee
41f7ca07b0 Merge pull request 'Update dependency com.influxdb:influxdb-spring to v7.2.0' (#45) from renovate/com.influxdb-influxdb-spring-7.x into master
Some checks failed
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Has been cancelled
Reviewed-on: #45
2024-08-13 17:26:51 +00:00
5ec61940ac Update dependency io.sentry:sentry-spring-boot-starter-jakarta to v7.14.0 2024-08-13 09:01:06 +00:00
6665e8a655 Update dependency com.influxdb:influxdb-spring to v7.2.0 2024-08-12 08:01:06 +00:00
07562eb94d Update dependency com.influxdb:influxdb-client-java to v7.2.0 2024-08-12 08:01:04 +00:00
Lee
a78adf67c7 Merge pull request 'Update dependency io.sentry:sentry-spring-boot-starter-jakarta to v7.13.0' (#43) from renovate/io.sentry-sentry-spring-boot-starter-jakarta-7.x into master
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 2m13s
Reviewed-on: #43
2024-07-31 15:59:25 +00:00
fc1f51da75 Update dependency io.sentry:sentry-spring-boot-starter-jakarta to v7.13.0 2024-07-31 10:00:30 +00:00
c796875d8c increase the timeout for mojang servers
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 3m12s
2024-07-30 22:06:01 +01:00
82fb2a3d23 Merge remote-tracking branch 'origin/master'
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 3m15s
2024-07-30 22:00:30 +01:00
2e326bb7be oopsie 2024-07-30 22:00:07 +01:00
Lee
c5bf941c54 Merge pull request 'Update dependency de.flapdoodle.embed:de.flapdoodle.embed.mongo.spring3x to v4.16.1' (#22) from renovate/de.flapdoodle.embed-de.flapdoodle.embed.mongo.spring3x-4.x into master
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 2m0s
Reviewed-on: #22
2024-07-30 20:55:26 +00:00
Lee
0eb965a26d Merge pull request 'Update dependency org.springframework.boot:spring-boot-starter-parent to v3.3.2' (#42) from renovate/org.springframework.boot-spring-boot-starter-parent-3.x into master
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 2m58s
Reviewed-on: #42
2024-07-30 20:52:18 +00:00
d83391de33 Update dependency org.springframework.boot:spring-boot-starter-parent to v3.3.2 2024-07-26 12:03:27 +00:00
4aa5b0a90d Update dependency de.flapdoodle.embed:de.flapdoodle.embed.mongo.spring3x to v4.16.1 2024-07-18 16:00:22 +00:00
4 changed files with 10 additions and 10 deletions

View File

@ -27,7 +27,7 @@ jobs:
# Setup Java and Maven
- name: Set up JDK and Maven
uses: s4u/setup-maven-action@v1.14.0
uses: s4u/setup-maven-action@v1.15.0
with:
java-version: ${{ matrix.java-version }}
distribution: "zulu"

10
pom.xml
View File

@ -17,7 +17,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.3.1</version>
<version>3.3.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
@ -133,20 +133,20 @@
<dependency>
<groupId>io.sentry</groupId>
<artifactId>sentry-spring-boot-starter-jakarta</artifactId>
<version>7.12.1</version>
<version>7.14.0</version>
</dependency>
<!-- InfluxDB Metrics -->
<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-spring</artifactId>
<version>7.1.0</version>
<version>7.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.influxdb</groupId>
<artifactId>influxdb-client-java</artifactId>
<version>7.1.0</version>
<version>7.2.0</version>
</dependency>
<!-- DNS Lookup -->
@ -194,7 +194,7 @@
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo.spring3x</artifactId>
<version>4.15.0</version>
<version>4.16.1</version>
<scope>test</scope>
</dependency>
</dependencies>

View File

@ -24,7 +24,7 @@ public enum MojangServer {
LIBRARIES("Libraries Server", "https://libraries.minecraft.net"),
SERVICES("Minecraft Services", "https://api.minecraftservices.com");
private static final long STATUS_TIMEOUT = TimeUnit.SECONDS.toMillis(4);
private static final long STATUS_TIMEOUT = TimeUnit.SECONDS.toMillis(10);
/**
* The name of this server.
@ -58,7 +58,7 @@ public enum MojangServer {
ex.printStackTrace();
} catch (IOException ignored) {
// We can safely ignore any errors, we're simply checking
// if the host is reachable, if it's not, it's offline.
// if the host is reachable, if it's not, then it's offline.
}
return Status.OFFLINE;
}

View File

@ -12,13 +12,13 @@ import org.springframework.web.bind.annotation.RestController;
import xyz.mcutils.backend.model.cache.CachedEndpointStatus;
import xyz.mcutils.backend.service.MojangService;
import java.util.Map;
import java.util.concurrent.TimeUnit;
@RestController
@RequestMapping(value = "/mojang/", produces = MediaType.APPLICATION_JSON_VALUE)
@Tag(name = "Mojang Controller", description = "The Mojang Controller is used to get information about the Mojang APIs.")
public class MojangController {
@Autowired
private MojangService mojangService;
@ -27,6 +27,6 @@ public class MojangController {
public ResponseEntity<?> getStatus() {
return ResponseEntity.ok()
.cacheControl(CacheControl.maxAge(1, TimeUnit.MINUTES).cachePublic())
.body(mojangService.getMojangServerStatus());
.body(Map.of("endpoints", mojangService.getMojangServerStatus()));
}
}