mirror of
https://github.com/munki/munki.git
synced 2026-01-27 17:39:32 -06:00
Start and stop precaching agent if appropriate
This commit is contained in:
@@ -432,7 +432,7 @@ let PRECACHING_AGENT_LABEL = "com.googlecode.munki.precache_agent"
|
||||
|
||||
/// Kick off a run of our precaching agent, which allows the precaching to
|
||||
/// run in the background after a normal Munki run
|
||||
func runPrecachingAgent() {
|
||||
func startPrecachingAgent() {
|
||||
if itemsToPrecache(getInstallInfo() ?? PlistDict()).isEmpty {
|
||||
// nothing to precache
|
||||
displayDebug1("Nothing found to precache.")
|
||||
|
||||
@@ -277,7 +277,7 @@ func checkForUpdates(clientID: String? = nil, localManifestPath: String? = nil)
|
||||
}
|
||||
|
||||
// stop precaching_agent if it's running
|
||||
// TODO: stopPrecachingAgent()
|
||||
stopPrecachingAgent()
|
||||
|
||||
// prevent idle sleep only if we are on AC power
|
||||
var caffeinator: Caffeinator? = nil
|
||||
@@ -547,7 +547,7 @@ func checkForUpdates(clientID: String? = nil, localManifestPath: String? = nil)
|
||||
|
||||
// start our precaching agent
|
||||
// note -- this must happen _after_ InstallInfo.plist gets written to disk.
|
||||
// TODO: download.run_precaching_agent()
|
||||
startPrecachingAgent()
|
||||
|
||||
if !success {
|
||||
return .finishedWithErrors
|
||||
|
||||
Reference in New Issue
Block a user