chore: Analytics file lock stale time (#26276)

This commit is contained in:
Anagh Hegde 2023-08-16 18:28:45 +05:30 committed by GitHub
parent 1aef2225aa
commit ce78775277
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -185,4 +185,6 @@ public class FieldNameCE {
public static final String GIT_HOSTING_PROVIDER = "gitHostingProvider";
public static final String IS_MERGEABLE = "isMergeable";
public static final String FILE_LOCK_DURATION = "fileLockDuration";
}

View File

@ -339,6 +339,7 @@ public class GlobalExceptionHandler {
analyticsProps.put(FieldName.APPLICATION_ID, appId);
}
if (!fileTime.equals(0L)) {
analyticsProps.put(FieldName.FILE_LOCK_DURATION, fileTime);
return sessionUserService
.getCurrentUser()
.flatMap(user -> analyticsService.sendEvent(

View File

@ -2236,7 +2236,7 @@ public class GitServiceCEImpl implements GitServiceCE {
.getGitApplicationMetadata()
.getIsRepoPrivate(),
false,
true))
mergeStatusDTO.isMergeAble()))
.then(Mono.just(mergeStatusDTO))))
.onErrorResume(error -> {
try {