Skip to content

Commit

Permalink
Increased legendary cache log verbosity
Browse files Browse the repository at this point in the history
  • Loading branch information
vapidinfinity committed Dec 12, 2023
1 parent d0c29cc commit 3542e10
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Mythic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2041;
CURRENT_PROJECT_VERSION = 2042;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Mythic/Preview Content\"";
DEVELOPMENT_TEAM = 67ZBY275P8;
Expand Down Expand Up @@ -758,7 +758,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2041;
CURRENT_PROJECT_VERSION = 2042;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"Mythic/Preview Content\"";
DEVELOPMENT_TEAM = 67ZBY275P8;
Expand Down
9 changes: 6 additions & 3 deletions Mythic/Controllers/Base/Legendary/Legendary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,14 @@ class Legendary {

if useCache, let cachedOutput = queue.cache.sync(execute: { commandCache[commandKey] }), !cachedOutput.stdout.isEmpty && !cachedOutput.stderr.isEmpty {
log.debug("Cached, returning.")
_ = await run()
log.debug("Cache returned, and new cache successfully appended.")
Task(priority: .background) {
_ = await run()
log.debug("New cache appended.")
}
log.debug("Cache returned.")
return cachedOutput
} else {
log.debug("\( useCache ? "Cache not found, creating" : "Cache disabled for this task." )")
log.debug("\( useCache ? "Building new cache" : "Cache disabled for this task." )")
return await run()
}

Expand Down

0 comments on commit 3542e10

Please sign in to comment.