mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-30 01:35:32 +00:00
Some stuff
This commit is contained in:
@@ -81,12 +81,12 @@ public class APIController : Controller {
|
||||
[FeatureGate(Features.SyntaxCheck, Features.AdminService)]
|
||||
public async Task<ActionResult<Dictionary<string, SyntaxCheckModel>?>> GetSyntaxCheck(string? id) {
|
||||
var SCCache = _xmlService.GetSCCache();
|
||||
if (_xmlProvider.HasChanged() || SCCache == null) {
|
||||
if (SCCache == null) {
|
||||
await _syntaxCheckLock.WaitAsync();
|
||||
try {
|
||||
// Double-check after acquiring lock
|
||||
SCCache = _xmlService.GetSCCache();
|
||||
if (_xmlProvider.HasChanged() || SCCache == null) {
|
||||
if (SCCache == null) {
|
||||
var commit = _xmlProvider.GetGitState();
|
||||
SCCache = _xmlService.Test(_xmlService.GetState(), commit != null ? commit.Commit : string.Empty);
|
||||
_xmlService.SetSCCache(SCCache);
|
||||
|
||||
Reference in New Issue
Block a user