public void UpdatePlanStatus(Plan plan)
    {
        PlanUpdateItem item = new PlanUpdateItem()
        {
            Plan = plan
        };

        if (ProcessPlansOnSingleton)
        {
            PlanItemSingletonProcessor.Instance.Queue.Enqueue(item);
        }
        else
        {
            UpdatePlanStatus(item);
        }
    }
Beispiel #2
0
    public void UpdatePlanStatus(PlanUpdateItem item)
    {
        try
        {
            cloudUriHandler.WriteFileInFolder(_histPath, $"{item.Plan.UniqueName}_{item.Plan.InstanceId}.yaml", YamlHelpers.Serialize(item.Plan));
        }
        catch (Exception ex)
        {
            PlanItemSingletonProcessor.Instance.Exceptions.Enqueue(ex);

            if (item.RetryAttempts++ < 5)
            {
                PlanItemSingletonProcessor.Instance.Queue.Enqueue(item);
            }
            else
            {
                PlanItemSingletonProcessor.Instance.Fatal.Enqueue(ex);
            }
        }
    }
    public void UpdatePlanStatus(PlanUpdateItem item)
    {
        try
        {
            SerializeYamlFile(UtilitiesPathCombine(_histPath, $"{item.Plan.UniqueName}_{item.Plan.InstanceId}{_histExt}"),
                              item.Plan, serializeAsJson: _histAsJson, formatJson: _histAsFormattedJson, emitDefaultValues: true);
        }
        catch (Exception ex)
        {
            PlanItemSingletonProcessor.Instance.Exceptions.Enqueue(ex);

            if (item.RetryAttempts++ < 5)
            {
                PlanItemSingletonProcessor.Instance.Queue.Enqueue(item);
            }
            else
            {
                PlanItemSingletonProcessor.Instance.Fatal.Enqueue(ex);
            }
        }
    }
    public void UpdatePlanStatus(PlanUpdateItem item)
    {
        try
        {
            YamlHelpers.SerializeFile(Utilities.PathCombine(_histPath, $"{item.Plan.UniqueName}_{item.Plan.InstanceId}.yaml"),
                                      item.Plan, emitDefaultValues: true);
        }
        catch (Exception ex)
        {
            PlanItemSingletonProcessor.Instance.Exceptions.Enqueue(ex);

            if (item.RetryAttempts++ < 5)
            {
                PlanItemSingletonProcessor.Instance.Queue.Enqueue(item);
            }
            else
            {
                PlanItemSingletonProcessor.Instance.Fatal.Enqueue(ex);
            }
        }
    }
Beispiel #5
0
 public void UpdatePlanStatus(PlanUpdateItem item)
 {
     throw new NotImplementedException();
 }
Beispiel #6
0
 public void UpdatePlanStatus(PlanUpdateItem item)
 {
     _planHistoryWriter.UpdatePlanStatus(item);
 }