feat: enhance MediaWiki integration and error handling in SMW client
- Added MediaWiki API configuration options to docker-compose.yml for production environment. - Improved error handling in the SMW client by introducing a response parsing method to manage API errors more effectively. - Updated methods in the SMW client to ensure robust handling of API responses, preventing potential crashes due to unexpected data structures. - Enhanced the import functionality to handle last imported timestamps more gracefully.
This commit is contained in:
1 parent
07b1cd8209
commit
362eb4145f
3 files changed
+71
-26
No files matched your search
@@ -42,6 +42,15 @@ services:
|
||||
APP_URL: "${APP_URL:-https://shinkan.jinkendo.de}"
|
||||
ALLOWED_ORIGINS: "${ALLOWED_ORIGINS:-https://shinkan.jinkendo.de}"
|
||||
ENVIRONMENT: "${ENVIRONMENT:-production}"
|
||||
# MediaWiki/SMW Import — in dev-env.yml bereits gesetzt; Prod brauchte diese Zeilen ebenfalls,
|
||||
# sonst: leere MEDIAWIKI_API_URL im Container → Import bricht ab (auf Test/Dev war es immer gesetzt).
|
||||
MEDIAWIKI_API_URL: "${MEDIAWIKI_API_URL:-https://karatetrainer.net/api.php}"
|
||||
MEDIAWIKI_USER: "${MEDIAWIKI_USER:-}"
|
||||
MEDIAWIKI_PASSWORD: "${MEDIAWIKI_PASSWORD:-}"
|
||||
MEDIAWIKI_CATEGORY_EXERCISES: "${MEDIAWIKI_CATEGORY_EXERCISES:-Übungen}"
|
||||
MEDIAWIKI_CATEGORY_SKILLS: "${MEDIAWIKI_CATEGORY_SKILLS:-Fähigkeitsbeschreibung}"
|
||||
MEDIAWIKI_CATEGORY_METHODS: "${MEDIAWIKI_CATEGORY_METHODS:-Methodenbeschreibung}"
|
||||
MEDIAWIKI_CATEGORY_MODELS: "${MEDIAWIKI_CATEGORY_MODELS:-Reifegradmodelle}"
|
||||
volumes:
|
||||
- shinkan-media:/app/media
|
||||
ports:
|
||||
|
||||
Reference in new issue
Block a user