internal void Heartbeat(string path, ILogger logger) { logger.Log( isUserOnlyLog: false, LogLevel.Trace, string.Format(PowerShellWorkerStrings.UpdatingManagedDependencySnapshotHeartbeat, path)); if (_storage.SnapshotExists(path)) { try { _storage.SetSnapshotAccessTimeToUtcNow(path); } // The files in the snapshot may be read-only in some scenarios, so updating // the timestamp may fail. However, the snapshot can still be used, and // we should not prevent function executions because of that. // So, just log and move on. catch (IOException e) { LogHeartbeatUpdateFailure(logger, path, e); } catch (UnauthorizedAccessException e) { LogHeartbeatUpdateFailure(logger, path, e); } } }
internal void Heartbeat(string path, ILogger logger) { logger.Log( isUserOnlyLog: false, LogLevel.Trace, string.Format(PowerShellWorkerStrings.UpdatingManagedDependencySnapshotHeartbeat, path)); if (_storage.SnapshotExists(path)) { _storage.SetSnapshotAccessTimeToUtcNow(path); } }