Compare commits

...

16 Commits

Author SHA1 Message Date
Sheldan
e4a899a125 [maven-release-plugin] prepare release sissi-1.4.27 2023-12-01 23:39:41 +01:00
Sheldan
ce8341e69a [SIS-xxx] changing caching
prepare for release
2023-12-01 23:38:38 +01:00
Sheldan
fa6333fa49 [maven-release-plugin] prepare for next development iteration 2023-12-01 23:16:02 +01:00
Sheldan
3393dea591 [maven-release-plugin] prepare release sissi-1.4.26 2023-12-01 23:15:57 +01:00
Sheldan
3c3bdfaed9 [SIS-xxx] preparing for release 2023-12-01 23:15:31 +01:00
Sheldan
172e3c4190 [SIS-xxx] adding uuid to clear cache 2023-12-01 23:14:57 +01:00
Sheldan
52b86804b9 [maven-release-plugin] prepare for next development iteration 2023-12-01 22:54:18 +01:00
Sheldan
de8d9982f3 [maven-release-plugin] prepare release sissi-1.4.25 2023-12-01 22:54:14 +01:00
Sheldan
29e1b22783 [SIS-xxx] preparing for release 2023-12-01 22:53:37 +01:00
Sheldan
5852d4837e [SIS-xxx] synchronizing the lookup for donations, so that simultaneous calls are not possible 2023-12-01 22:49:34 +01:00
Sheldan
b345fa5502 [SIS-xxx] fixing logging setup in case of a debra donation loading error 2023-11-30 21:02:16 +01:00
Sheldan
d6470e3714 [SIS-xxx] changing meetup time display to include week day name 2023-11-30 19:55:47 +01:00
Sheldan
b4cebe2b41 [maven-release-plugin] prepare for next development iteration 2023-11-29 21:08:14 +01:00
Sheldan
f3dd85d7d5 [maven-release-plugin] prepare release sissi-1.4.24 2023-11-29 21:08:10 +01:00
Sheldan
db318afb2b [SIS-xxx] preparing for release 2023-11-29 21:07:34 +01:00
Sheldan
ddd710d1c2 [SIS-xxx] changing wording of debra campaign info image 2023-11-29 21:05:02 +01:00
50 changed files with 76 additions and 66 deletions

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>application</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>executable</artifactId>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application.module.custom</groupId>
<artifactId>sissi-customizations</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>application</artifactId>
<groupId>dev.sheldan.sissi.application</groupId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>sissi-modules</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -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

View File

@@ -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 DonationsResponse getCachedDonationAmount(Long serverId) {
return fetchCurrentDonationAmount(serverId);
public synchronized DonationsResponse getCachedDonationAmount(Long serverId) {
return self.fetchCurrentDonationAmount(serverId);
}
public DonationsResponse fetchCurrentDonationAmount(Long serverId) {
@@ -148,10 +152,8 @@ public class DonationService {
.build();
Response response = okHttpClient.newCall(request).execute();
if(!response.isSuccessful()) {
if (log.isDebugEnabled()) {
log.error("Failed to retrieve donation response. Response had code {} with body {}.",
response.code(), response.body());
}
log.error("Failed to retrieve donation response. Response had code {} with body {} and headers {}.",
response.code(), response.body().string(), response.headers());
throw new DonationAmountNotFoundException();
}
Gson gson = getGson();

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>sissi-modules</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>application</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.application</groupId>
<artifactId>sissi-modules</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>sissi-modules</artifactId>
<groupId>dev.sheldan.sissi.application</groupId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -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.23
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.23"
appVersion: "1.4.27"

View File

@@ -8,7 +8,7 @@ bot:
repository: harbor.sheldan.dev/sissi
pullPolicy: IfNotPresent
image: sissi-bot
tag: 1.4.23
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.23
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.23
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.23
tag: 1.4.27
dbCredentials:
host:

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi</groupId>
<artifactId>deployment</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -1,2 +1,2 @@
REGISTRY_PREFIX=harbor.sheldan.dev/sissi/
VERSION=1.4.23
VERSION=1.4.27

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -13,7 +13,7 @@
<groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId>
<name>Sissi</name>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
<properties>
<maven.compiler.target>17</maven.compiler.target>
@@ -59,7 +59,7 @@
<scm>
<url>https://maven.pkg.github.com/Sheldan/Sissi</url>
<developerConnection>scm:git:git@github.com:Sheldan/Sissi.git</developerConnection>
<tag>HEAD</tag>
<tag>sissi-1.4.27</tag>
</scm>
</project>

View File

@@ -4,6 +4,7 @@ import requests
import os
import json
import logging
import uuid
from __main__ import app
from utils import serve_pil_image
@@ -69,6 +70,7 @@ class DonationImageGenerationParameters:
self.validation_message = f'Blue must be between {DonationImageGenerationConstants.color_range[0]} and {DonationImageGenerationConstants.color_range[1]} inclusively'
self.validation_value = self.color[2]
@app.route('/debra/latestDonations')
def latest_donations():
donation_stats = requests.get(latest_donations_url)
@@ -123,7 +125,7 @@ def total_donations_image():
img = Image.new('RGBA', (parameters.canvas_width, parameters.canvas_height), (255, 0, 0, 0))
d1 = ImageDraw.Draw(img)
font = ImageFont.truetype(f'{parameters.font_name}.ttf', parameters.font_size)
d1.text((0, 0), f"Aktuell {campaign_info['collected']}/{campaign_info['target']}", fill=parameters.color, font=font)
d1.text((0, 0), f"{campaign_info['collected']}/{campaign_info['target']}", fill=parameters.color, font=font)
return serve_pil_image(img)
@@ -150,19 +152,25 @@ def highest_donation_image():
@app.route('/debra/image/highestDonations/html')
def highest_donations_image_html_wrapper():
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/highestDonations?{request.query_string.decode()}', refreshInterval=refresh_interval)
random_bit = str(uuid.uuid4())
parameters_query = request.query_string.decode()
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/highestDonations?{parameters_query}&{random_bit}', refreshInterval=refresh_interval)
@app.route('/debra/image/latestDonations/html')
def latest_donations_image_html_wrapper():
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/latestDonations?{request.query_string.decode()}', refreshInterval=refresh_interval)
random_bit = str(uuid.uuid4())
parameters_query = request.query_string.decode()
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/latestDonations?{parameters_query}&{random_bit}', refreshInterval=refresh_interval)
@app.route('/debra/image/info/html')
def total_donations_image_html_wrapper():
refresh_interval = int(request.args.get('refreshInterval', 30, type=int))
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/info?{request.query_string.decode()}', refreshInterval=refresh_interval)
random_bit = str(uuid.uuid4())
parameters_query = request.query_string.decode()
return render_template('image_refresh_wrapper.html', imagePath=f'/debra/image/info?{parameters_query}&{random_bit}', refreshInterval=refresh_interval)
def rendering_donation_image(donation_stats, parameters):

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>customization-templates</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>sissi-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>module-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>module-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
"embeds": [
{
<#include "abstracto_color">,
<#assign time><@format_instant_date_time instant=meetupTime/></#assign>
<#assign time><@format_instant_long_date_time instant=meetupTime/></#assign>
<#assign topicText>${topic?json_string}</#assign>
"description": "<#include "meetup_cancel_notification_description">"
}

View File

@@ -6,7 +6,7 @@
"title": {
"title": "${topic?json_string}"
},
"description": "<@format_instant_date_time instant=meetupTime/>
"description": "<@format_instant_long_date_time instant=meetupTime/>
${description?json_string}"
}
],

View File

@@ -4,8 +4,8 @@
{
<#include "abstracto_color">,
<#assign topicText=meetupTopic>
<#assign oldTime><@format_instant_date_time instant=oldDate/></#assign>
<#assign newTime><@format_instant_date_time instant=newDate/></#assign>
<#assign oldTime><@format_instant_long_date_time instant=oldDate/></#assign>
<#assign newTime><@format_instant_long_date_time instant=newDate/></#assign>
<#assign messageLink=meetupMessage.jumpUrl>
"description": "<@safe_include "changeMeetupTime_notification_text"/>"
}

View File

@@ -6,7 +6,7 @@
"title": {
"title": "${topic?json_string}"
},
"description": "<@format_instant_date_time instant=meetupTime/>
"description": "<@format_instant_long_date_time instant=meetupTime/>
${description?json_string}"
<#if location?? && location != "%22%22">,
"fields": [

View File

@@ -3,7 +3,7 @@
"embeds": [
{
<#include "abstracto_color">,
"description": "<#list meetups as meetup><#assign meetup=meetup><#assign topic=meetup.topic><#assign time><@format_instant_date_time instant=meetup.meetupTime/></#assign><#assign timeRelative><@format_instant_relative instant=meetup.meetupTime/></#assign><#assign link=meetup.meetupMessage.jumpUrl><#include "meetup_list_meetup_display">
"description": "<#list meetups as meetup><#assign meetup=meetup><#assign topic=meetup.topic><#assign time><@format_instant_long_date_time instant=meetup.meetupTime/></#assign><#assign timeRelative><@format_instant_relative instant=meetup.meetupTime/></#assign><#assign link=meetup.meetupMessage.jumpUrl><#include "meetup_list_meetup_display">
<#else><#include "meetup_list_no_meetups"></#list>"
}
]

View File

@@ -8,7 +8,7 @@
"title": {
"title": "${topic?json_string} - <@safe_include "meetup_message_id_display"/>"
},
<#assign time><@format_instant_date_time instant=meetupTime/></#assign>
<#assign time><@format_instant_long_date_time instant=meetupTime/></#assign>
<#assign timeRelative><@format_instant_relative instant=meetupTime/></#assign>
<#assign organizerText>${organizer.memberMention}</#assign>
<#assign meetupId=meetupId/>

View File

@@ -3,7 +3,7 @@
"embeds": [
{
<#include "abstracto_color">,
<#assign time><@format_instant_date_time instant=meetupTime/></#assign>
<#assign time><@format_instant_long_date_time instant=meetupTime/></#assign>
<#assign topicText>${topic?json_string}</#assign>
"description": "<#include "meetup_reminder_notification_description">"
}

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>sissi-templates</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>module-templates</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>module-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>templates</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>template-overrides</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>template-overrides</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>template-overrides</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>sissi-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>customization-translations</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>sissi-translations</artifactId>
<groupId>dev.sheldan.sissi.templates.translations</groupId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>module-translations</artifactId>
<groupId>dev.sheldan.sissi.templates.translations</groupId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>module-translations</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>sissi-translations</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>module-translations</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>module-translations</artifactId>
<groupId>dev.sheldan.sissi.templates.translations</groupId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>templates</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates.translations.overrides</groupId>
<artifactId>translation-overrides</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates.translations.overrides</groupId>
<artifactId>translation-overrides</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates.translations.overrides</groupId>
<artifactId>translation-overrides</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>sissi-translations</artifactId>
<version>1.4.24-SNAPSHOT</version>
<version>1.4.27</version>
</parent>
<modelVersion>4.0.0</modelVersion>