mirror of
https://github.com/Sheldan/Sissi.git
synced 2026-01-26 19:21:43 +00:00
[SIS-xxx] changing caching
prepare for release
This commit is contained in:
@@ -21,7 +21,7 @@ public class DebraDonationStatusController {
|
||||
@GetMapping(value = "/latestDonations", produces = "application/json")
|
||||
public DonationStats getLatestDonations() {
|
||||
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
||||
DonationsResponse donationResponse = donationService.getCachedDonationAmount(serverId);
|
||||
DonationsResponse donationResponse = donationService.getSynchronizedCachedDonationAmount(serverId);
|
||||
List<DonationInfo> donations = donationService.getLatestDonations(donationResponse, Integer.MAX_VALUE)
|
||||
.stream()
|
||||
.map(DonationInfo::fromDonationItemModel)
|
||||
@@ -36,7 +36,7 @@ public class DebraDonationStatusController {
|
||||
@GetMapping(value = "/highestDonations", produces = "application/json")
|
||||
public DonationStats getHighestDonations() {
|
||||
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
||||
DonationsResponse donationResponse = donationService.getCachedDonationAmount(serverId);
|
||||
DonationsResponse donationResponse = donationService.getSynchronizedCachedDonationAmount(serverId);
|
||||
List<DonationInfo> donations = donationService.getHighestDonations(donationResponse, Integer.MAX_VALUE)
|
||||
.stream()
|
||||
.map(DonationInfo::fromDonationItemModel)
|
||||
@@ -51,7 +51,7 @@ public class DebraDonationStatusController {
|
||||
@GetMapping(value = "/campaignInfo", produces = "application/json")
|
||||
public CampaignInfo getCampaignInfo() {
|
||||
Long serverId = Long.parseLong(System.getenv(DEBRA_DONATION_NOTIFICATION_SERVER_ID_ENV_NAME));
|
||||
DonationsResponse donationResponse = donationService.getCachedDonationAmount(serverId);
|
||||
DonationsResponse donationResponse = donationService.getSynchronizedCachedDonationAmount(serverId);
|
||||
|
||||
Description pageObject = donationResponse.getPage();
|
||||
return CampaignInfo
|
||||
|
||||
@@ -134,9 +134,13 @@ public class DonationService {
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public synchronized DonationsResponse getSynchronizedCachedDonationAmount(Long serverId) {
|
||||
return self.getCachedDonationAmount(serverId);
|
||||
}
|
||||
|
||||
@Cacheable(value = "donation-cache")
|
||||
public synchronized DonationsResponse getCachedDonationAmount(Long serverId) {
|
||||
return fetchCurrentDonationAmount(serverId);
|
||||
return self.fetchCurrentDonationAmount(serverId);
|
||||
}
|
||||
|
||||
public DonationsResponse fetchCurrentDonationAmount(Long serverId) {
|
||||
|
||||
@@ -15,10 +15,10 @@ type: application
|
||||
# This is the chart version. This version number should be incremented each time you make changes
|
||||
# to the chart and its templates, including the app version.
|
||||
# Versions are expected to follow Semantic Versioning (https://semver.org/)
|
||||
version: 1.4.26
|
||||
version: 1.4.27
|
||||
|
||||
# This is the version number of the application being deployed. This version number should be
|
||||
# incremented each time you make changes to the application. Versions are not expected to
|
||||
# follow Semantic Versioning. They should reflect the version the application is using.
|
||||
# It is recommended to use it with quotes.
|
||||
appVersion: "1.4.26"
|
||||
appVersion: "1.4.27"
|
||||
|
||||
@@ -8,7 +8,7 @@ bot:
|
||||
repository: harbor.sheldan.dev/sissi
|
||||
pullPolicy: IfNotPresent
|
||||
image: sissi-bot
|
||||
tag: 1.4.26
|
||||
tag: 1.4.27
|
||||
livenessProbe:
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 5
|
||||
@@ -25,7 +25,7 @@ restApi:
|
||||
repository: harbor.sheldan.dev/sissi
|
||||
pullPolicy: IfNotPresent
|
||||
image: sissi-rest-api
|
||||
tag: 1.4.26
|
||||
tag: 1.4.27
|
||||
podAnnotations: {}
|
||||
podSecurityContext: {}
|
||||
securityContext: {}
|
||||
@@ -74,7 +74,7 @@ templateDeploymentData:
|
||||
repository: harbor.sheldan.dev/sissi
|
||||
pullPolicy: Always
|
||||
image: sissi-template-data
|
||||
tag: 1.4.26
|
||||
tag: 1.4.27
|
||||
|
||||
dbConfigDeployment:
|
||||
enabled: true
|
||||
@@ -87,7 +87,7 @@ dbConfigDeploymentData:
|
||||
repository: harbor.sheldan.dev/sissi
|
||||
pullPolicy: Always
|
||||
image: sissi-db-data
|
||||
tag: 1.4.26
|
||||
tag: 1.4.27
|
||||
|
||||
dbCredentials:
|
||||
host:
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
REGISTRY_PREFIX=harbor.sheldan.dev/sissi/
|
||||
VERSION=1.4.26
|
||||
VERSION=1.4.27
|
||||
Reference in New Issue
Block a user