Changed IsDocker check (#1998)
* Refactored IsDocker to be completely static and changed to use an environment variable instead. * Removed file from another branch
This commit is contained in:
parent
57a6c769bc
commit
be5b5d9251
10 changed files with 20 additions and 77 deletions
|
@ -119,7 +119,7 @@ public class StatsService : IStatsService
|
|||
Os = RuntimeInformation.OSDescription,
|
||||
KavitaVersion = serverSettings.InstallVersion,
|
||||
DotnetVersion = Environment.Version.ToString(),
|
||||
IsDocker = new OsInfo().IsDocker,
|
||||
IsDocker = OsInfo.IsDocker,
|
||||
NumOfCores = Math.Max(Environment.ProcessorCount, 1),
|
||||
UsersWithEmulateComicBook = await _context.AppUserPreferences.CountAsync(p => p.EmulateBook),
|
||||
TotalReadingHours = await _statisticService.TimeSpentReadingForUsersAsync(ArraySegment<int>.Empty, ArraySegment<int>.Empty),
|
||||
|
|
|
@ -100,7 +100,7 @@ public class VersionUpdaterService : IVersionUpdaterService
|
|||
UpdateBody = _markdown.Transform(update.Body.Trim()),
|
||||
UpdateTitle = update.Name,
|
||||
UpdateUrl = update.Html_Url,
|
||||
IsDocker = new OsInfo(Array.Empty<IOsVersionAdapter>()).IsDocker,
|
||||
IsDocker = OsInfo.IsDocker,
|
||||
PublishDate = update.Published_At
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue