public string SetInstallStatus(string status)
        {
            using (lockObject.Lock())
            {
                this.installStatusType = EnumUtils.GetValue <InstallStatusType>(status);

                if (this.installStatusType == InstallStatusType.InstallsStarted)
                {
                    if (this.InstallCount > 0)
                    {
                        currentActionVerb = "Caching";

                        this.cacheStatusType = CacheStatusType.WatchingForPackages;
                    }
                }
                else if (this.installStatusType == InstallStatusType.Finalized)
                {
                    currentActionVerb = "Last pass syncing";

                    this.LastPassProcess();
                    NothingToPoll = true;
                }

                return($"Install status set to { this.installStatusType.ToString() }");
            }
        }
Exemple #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public InstallStatus(InstallStatusType statusType, Exception error = null)
 {
     _statusType = statusType;
     if (error != null)
     {
         _errors.Add(error);
     }
 }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public InstallStatus(InstallStatusType statusType, IEnumerable <ProviderInstallTask> taskToRun, Exception error = null) : this(statusType, error)
 {
     _statusType = statusType;
     taskToRun.ForEach(x => _tasksToRun.Add(x));
 }
        public PackageCacheStatusInfo(CacheStatusType cacheStatusType, string currentActionVerb, InstallStatusType installStatusType, int sweepIndex, int sweepCount, DateTime lastSweepStart, DateTime lastCacheStatusRequest, Dictionary <string, List <PathCacheStatus> > pathsProcessed, MemoryStatus memoryStatus)
        {
            this.CacheStatus    = cacheStatusType.ToString();
            this.InstallStatus  = installStatusType.ToString();
            this.SweepIndex     = sweepIndex;
            this.SweepCount     = sweepCount;
            this.LastSweepStart = lastSweepStart;

            Debug.Assert(currentActionVerb != null);

            this.CurrentActionVerb = currentActionVerb;

            this.pathsProcessed      = pathsProcessed.ToDictionary();
            this.pathsProcessedDelta = pathsProcessed.Where(p => p.Value.Last().Timestamp >= lastCacheStatusRequest).ToDictionary();

            if (memoryStatus != null)
            {
                memoryStatus.Update();

                this.MemoryStatus = memoryStatus;
            }
        }
 public static bool AnyProvidersHaveStatus(this IRebelApplicationContext appContext, InstallStatusType status)
 {
     return appContext.GetInstallStatus().Any(s => s.StatusType == status);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public InstallStatus(InstallStatusType statusType, Exception error = null)
 {
     _statusType = statusType;
     if (error != null)
         _errors.Add(error);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public InstallStatus(InstallStatusType statusType, IEnumerable<ProviderInstallTask> taskToRun, Exception error = null) : this(statusType, error)
 {
     _statusType = statusType;
     taskToRun.ForEach(x => _tasksToRun.Add(x));
 }
 public static bool AnyProvidersHaveStatus(this IUmbracoApplicationContext appContext, InstallStatusType status)
 {
     return(appContext.GetInstallStatus().Any(s => s.StatusType == status));
 }