mirror of
https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
synced 2025-10-29 01:05: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);
|
||||
|
||||
@@ -49,10 +49,8 @@ public class XMLFileProvider : IXMLFileProvider {
|
||||
_hamannFileProvider = new PhysicalFileProvider(hamannPath);
|
||||
_workingTreeFileProvider = new PhysicalFileProvider(gitPath);
|
||||
|
||||
// Pull latest changes on startup (if repo exists)
|
||||
if (_GitService.GetGitState() != null) {
|
||||
_GitService.Pull();
|
||||
}
|
||||
// Pull latest changes on startup
|
||||
_GitService.Pull();
|
||||
|
||||
// Create File Lists; Here and in xmlservice, which does preliminary checking
|
||||
Scan();
|
||||
|
||||
Reference in New Issue
Block a user