Refactoring of HttpClientHelper.
Changes in error logging
This commit is contained in:
Родитель
d5d2376efd
Коммит
75db613d08
|
@ -50,9 +50,11 @@
|
|||
<Link>Version.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Contracts\ContractEnums.cs" />
|
||||
<Compile Include="Contracts\OdataActionsConstants.cs" />
|
||||
<Compile Include="Contracts\ConnectorApiActions.cs" />
|
||||
<Compile Include="Contracts\PackageApiActions.cs" />
|
||||
<Compile Include="Helpers\AuthenticationHelper.cs" />
|
||||
<Compile Include="Helpers\FileOperationsHelper.cs" />
|
||||
<Compile Include="Helpers\HttpRetryHandler.cs" />
|
||||
<Compile Include="JobSettings\ExportJobSettings.cs" />
|
||||
<Compile Include="JobSettings\ImportJobSettings.cs" />
|
||||
<Compile Include="JobSettings\ExecutionJobSettings.cs" />
|
||||
|
@ -83,8 +85,11 @@
|
|||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="log4net">
|
||||
<Version>2.0.8</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Identity.Client">
|
||||
<Version>4.8.1</Version>
|
||||
<Version>4.8.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json">
|
||||
<Version>12.0.3</Version>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the MIT License. */
|
||||
|
||||
namespace RecurringIntegrationsScheduler.Common.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Class holding all requests paths related to Connector API
|
||||
/// </summary>
|
||||
public static class ConnectorApiActions
|
||||
{
|
||||
public const string EnqueuePath = "api/connector/enqueue/";
|
||||
public const string DequeuePath = "api/connector/dequeue/";
|
||||
public const string AckPath = "api/connector/ack/";
|
||||
public const string JobStatusPath = "api/connector/jobstatus/";
|
||||
}
|
||||
}
|
|
@ -4,9 +4,9 @@
|
|||
namespace RecurringIntegrationsScheduler.Common.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Class holding all constant values related to the Odata actions used in this solution
|
||||
/// Class holding requests paths related to Package API
|
||||
/// </summary>
|
||||
public static class OdataActionsConstants
|
||||
public static class PackageApiActions
|
||||
{
|
||||
public const string GetAzureWriteUrlActionPath = "data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetAzureWriteUrl";
|
||||
public const string GetExecutionSummaryStatusActionPath = "data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExecutionSummaryStatus";
|
||||
|
@ -21,4 +21,4 @@ namespace RecurringIntegrationsScheduler.Common.Contracts
|
|||
public const string GenerateImportTargetErrorKeysFilePath = "data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GenerateImportTargetErrorKeysFile";
|
||||
public const string GetExecutionErrorsPath = "data/DataManagementDefinitionGroups/Microsoft.Dynamics.DataEntities.GetExecutionErrors";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -332,5 +332,15 @@ namespace RecurringIntegrationsScheduler.Common.Contracts
|
|||
/// Get execution errors
|
||||
/// </summary>
|
||||
public const string GetExecutionErrors = "GetExecutionErrors";
|
||||
|
||||
/// <summary>
|
||||
/// Log verbose
|
||||
/// </summary>
|
||||
public const string LogVerbose = "LogVerbose";
|
||||
|
||||
/// <summary>
|
||||
/// Job key
|
||||
/// </summary>
|
||||
public const string JobKey = "JobKey";
|
||||
}
|
||||
}
|
|
@ -2,7 +2,6 @@
|
|||
Licensed under the MIT License. */
|
||||
|
||||
using Microsoft.Identity.Client;
|
||||
using Polly.Retry;
|
||||
using RecurringIntegrationsScheduler.Common.JobSettings;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
@ -18,18 +17,15 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
{
|
||||
private readonly Settings _settings;
|
||||
private string _authorizationHeader;
|
||||
private readonly AsyncRetryPolicy _retryPolicy;
|
||||
private const string AuthEndpoint = "https://login.microsoftonline.com/";
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AuthenticationHelper"/> class.
|
||||
/// </summary>
|
||||
/// <param name="jobSettings">Job settings</param>
|
||||
/// <param name="retryPolicy">Retry policy</param>
|
||||
public AuthenticationHelper(Settings jobSettings, Polly.Retry.AsyncRetryPolicy retryPolicy)
|
||||
public AuthenticationHelper(Settings jobSettings)
|
||||
{
|
||||
_settings = jobSettings;
|
||||
_retryPolicy = retryPolicy;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -62,18 +58,18 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
.WithClientSecret(_settings.AadClientSecret)
|
||||
.WithAuthority(authority)
|
||||
.Build();
|
||||
AuthenticationResult = await _retryPolicy.ExecuteAsync(() => appConfidential.AcquireTokenForClient(scopes).ExecuteAsync());
|
||||
AuthenticationResult = await appConfidential.AcquireTokenForClient(scopes).ExecuteAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
appPublic = PublicClientApplicationBuilder.Create(_settings.AadClientId.ToString())
|
||||
.WithAuthority(authority)
|
||||
.Build();
|
||||
var accounts = await _retryPolicy.ExecuteAsync(() => appPublic.GetAccountsAsync());
|
||||
var accounts = await appPublic.GetAccountsAsync();
|
||||
|
||||
if (accounts.Any())
|
||||
{
|
||||
AuthenticationResult = await _retryPolicy.ExecuteAsync(() => appPublic.AcquireTokenSilent(scopes, accounts.FirstOrDefault()).ExecuteAsync());
|
||||
AuthenticationResult = await appPublic.AcquireTokenSilent(scopes, accounts.FirstOrDefault()).ExecuteAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -82,7 +78,7 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
{
|
||||
securePassword.AppendChar(c);
|
||||
}
|
||||
AuthenticationResult = await _retryPolicy.ExecuteAsync(() => appPublic.AcquireTokenByUsernamePassword(scopes, _settings.UserName, securePassword).ExecuteAsync());
|
||||
AuthenticationResult = await appPublic.AcquireTokenByUsernamePassword(scopes, _settings.UserName, securePassword).ExecuteAsync();
|
||||
}
|
||||
}
|
||||
return _authorizationHeader = AuthenticationResult.CreateAuthorizationHeader();
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
/* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the MIT License. */
|
||||
|
||||
using log4net;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Polly.Retry;
|
||||
using RecurringIntegrationsScheduler.Common.JobSettings;
|
||||
using RecurringIntegrationsScheduler.Common.Properties;
|
||||
using RecurringIntegrationsScheduler.Common.Contracts;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
|
@ -23,17 +24,22 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
private readonly HttpClient _httpClient;
|
||||
private readonly AuthenticationHelper _authenticationHelper;
|
||||
private bool _disposed;
|
||||
private readonly AsyncRetryPolicy _retryPolicy;
|
||||
|
||||
/// <summary>
|
||||
/// The log
|
||||
/// </summary>
|
||||
private static readonly ILog Log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="HttpClientHelper"/> class.
|
||||
/// </summary>
|
||||
/// <param name="jobSettings">Job settings</param>
|
||||
/// <param name="retryPolicy">Retry policy</param>
|
||||
public HttpClientHelper(Settings jobSettings, Polly.Retry.AsyncRetryPolicy retryPolicy)
|
||||
public HttpClientHelper(Settings jobSettings)
|
||||
{
|
||||
log4net.Config.XmlConfigurator.Configure();
|
||||
|
||||
_settings = jobSettings;
|
||||
_retryPolicy = retryPolicy;
|
||||
|
||||
//Use Tls1.2 as default transport layer
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
@ -44,12 +50,19 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate
|
||||
};
|
||||
|
||||
_httpClient = new HttpClient(httpClientHandler)
|
||||
_httpClient = new HttpClient(new HttpRetryHandler(httpClientHandler, _settings.RetryCount, _settings.RetryDelay))
|
||||
{
|
||||
Timeout = TimeSpan.FromMinutes(60) //Timeout for large uploads or downloads
|
||||
};
|
||||
|
||||
_authenticationHelper = new AuthenticationHelper(_settings, _retryPolicy);
|
||||
_authenticationHelper = new AuthenticationHelper(_settings);
|
||||
|
||||
if(_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper was successfully initialized.
|
||||
Request retry count: {_settings.RetryCount}.
|
||||
Delay between retries: {_settings.RetryDelay} seconds.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -57,25 +70,35 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
/// </summary>
|
||||
/// <param name="uri">Enqueue endpoint URI</param>
|
||||
/// <param name="bodyStream">Body stream</param>
|
||||
/// <param name="externalCorrelationHeaderValue">ActivityMessage context</param>
|
||||
/// <param name="externalidentifier">ActivityMessage context</param>
|
||||
/// <returns></returns>
|
||||
public async Task<HttpResponseMessage> PostStreamRequestAsync(Uri uri, Stream bodyStream, string externalCorrelationHeaderValue = null)
|
||||
public async Task<HttpResponseMessage> PostStreamRequestAsync(Uri uri, Stream bodyStream, string externalidentifier = null)
|
||||
{
|
||||
_httpClient.DefaultRequestHeaders.Clear();
|
||||
_httpClient.DefaultRequestHeaders.Add("Authorization", await _authenticationHelper.GetValidAuthenticationHeader());
|
||||
|
||||
// Add external correlation id header if specified and valid
|
||||
if (!string.IsNullOrEmpty(externalCorrelationHeaderValue))
|
||||
if (!string.IsNullOrEmpty(externalidentifier))
|
||||
{
|
||||
_httpClient.DefaultRequestHeaders.Add("x-ms-dyn-externalidentifier", externalCorrelationHeaderValue);
|
||||
_httpClient.DefaultRequestHeaders.Add("x-ms-dyn-externalidentifier", externalidentifier);
|
||||
}
|
||||
|
||||
if (bodyStream != null)
|
||||
{
|
||||
return await _retryPolicy.ExecuteAsync(() => _httpClient.PostAsync(uri, new StreamContent(bodyStream)));
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.PostStreamRequestAsync is being called.
|
||||
Uri: {uri.AbsoluteUri},
|
||||
|
||||
Parameters:
|
||||
|
||||
bodyStream is not null,
|
||||
externalidentifier: {externalidentifier}");
|
||||
}
|
||||
return await _httpClient.PostAsync(uri, new StreamContent(bodyStream));
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Job: {_settings.JobKey}. HttpClientHelper.PostStreamRequestAsync method was called with empty 'bodyStream' parameter.");
|
||||
return new HttpResponseMessage
|
||||
{
|
||||
Content = new StringContent(Resources.Request_failed_at_client, Encoding.ASCII),
|
||||
|
@ -89,26 +112,37 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
/// </summary>
|
||||
/// <param name="uri">Request Uri</param>
|
||||
/// <param name="bodyString">Body string</param>
|
||||
/// <param name="externalCorrelationHeaderValue">Activity Message context</param>
|
||||
/// <param name="externalidentifier">Activity Message context</param>
|
||||
/// <returns>HTTP response</returns>
|
||||
public async Task<HttpResponseMessage> PostStringRequestAsync(Uri uri, string bodyString, string externalCorrelationHeaderValue = null)
|
||||
public async Task<HttpResponseMessage> PostStringRequestAsync(Uri uri, string bodyString, string externalidentifier = null)
|
||||
{
|
||||
_httpClient.DefaultRequestHeaders.Clear();
|
||||
_httpClient.DefaultRequestHeaders.Add("Authorization", await _authenticationHelper.GetValidAuthenticationHeader());
|
||||
_httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
|
||||
// Add external correlation id header if specified and valid
|
||||
if (!string.IsNullOrEmpty(externalCorrelationHeaderValue))
|
||||
if (!string.IsNullOrEmpty(externalidentifier))
|
||||
{
|
||||
_httpClient.DefaultRequestHeaders.Add("x-ms-dyn-externalidentifier", externalCorrelationHeaderValue);
|
||||
_httpClient.DefaultRequestHeaders.Add("x-ms-dyn-externalidentifier", externalidentifier);
|
||||
}
|
||||
|
||||
if (bodyString != null)
|
||||
{
|
||||
return await _retryPolicy.ExecuteAsync(() => _httpClient.PostAsync(uri, new StringContent(bodyString, Encoding.UTF8, "application/json")));
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.PostStringRequestAsync is being called.
|
||||
Uri: {uri.AbsoluteUri},
|
||||
|
||||
Parameters:
|
||||
|
||||
bodyString: {bodyString},
|
||||
externalidentifier: {externalidentifier}");
|
||||
}
|
||||
return await _httpClient.PostAsync(uri, new StringContent(bodyString, Encoding.UTF8, "application/json"));
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error($"Job: {_settings.JobKey}. HttpClientHelper.PostStringRequestAsync method was called with empty 'bodyString' parameter.");
|
||||
return new HttpResponseMessage
|
||||
{
|
||||
Content = new StringContent(Resources.Request_failed_at_client, Encoding.ASCII),
|
||||
|
@ -130,7 +164,16 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
{
|
||||
_httpClient.DefaultRequestHeaders.Add("Authorization", await _authenticationHelper.GetValidAuthenticationHeader());
|
||||
}
|
||||
return await _retryPolicy.ExecuteAsync(() => _httpClient.GetAsync(uri));
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetRequestAsync is being called.
|
||||
Uri: {uri.AbsoluteUri},
|
||||
|
||||
Parameters:
|
||||
|
||||
addAuthorization: {addAuthorization}");
|
||||
}
|
||||
return await _httpClient.GetAsync(uri);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -142,7 +185,7 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
public Uri GetEnqueueUri(string legalEntity = null)
|
||||
{
|
||||
var uploadSettings = _settings as UploadJobSettings;
|
||||
var enqueueUri = new UriBuilder(GetAosRequestUri("api/connector/enqueue/" + uploadSettings.ActivityId));
|
||||
var enqueueUri = new UriBuilder(GetAosRequestUri(ConnectorApiActions.EnqueuePath + uploadSettings.ActivityId));
|
||||
|
||||
if (!string.IsNullOrEmpty(legalEntity))
|
||||
{
|
||||
|
@ -161,6 +204,18 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
// entity name is required
|
||||
enqueueUri.Query += "entity=" + uploadSettings.EntityName;
|
||||
}
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetEnqueueUri is being called.
|
||||
Parameters:
|
||||
|
||||
legalEntity: {legalEntity}
|
||||
|
||||
Output:
|
||||
|
||||
Generated Uri: {enqueueUri.Uri.AbsoluteUri}
|
||||
Generated query: {enqueueUri.Query}");
|
||||
}
|
||||
return enqueueUri.Uri;
|
||||
}
|
||||
|
||||
|
@ -173,7 +228,15 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
public Uri GetDequeueUri()
|
||||
{
|
||||
var downloadSettings = _settings as DownloadJobSettings;
|
||||
return new UriBuilder(GetAosRequestUri("api/connector/dequeue/" + downloadSettings.ActivityId)).Uri;
|
||||
var dequeueUri = new UriBuilder(GetAosRequestUri(ConnectorApiActions.DequeuePath + downloadSettings.ActivityId)).Uri;
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetDequeueUri is being called.
|
||||
Output:
|
||||
|
||||
Generated Uri: {dequeueUri.AbsoluteUri}");
|
||||
}
|
||||
return dequeueUri;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -185,7 +248,15 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
public Uri GetAckUri()
|
||||
{
|
||||
var downloadSettings = _settings as DownloadJobSettings;
|
||||
return new UriBuilder(GetAosRequestUri("api/connector/ack/" + downloadSettings.ActivityId)).Uri;
|
||||
var ackUri = new UriBuilder(GetAosRequestUri(ConnectorApiActions.AckPath + downloadSettings.ActivityId)).Uri;
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetAckUri is being called.
|
||||
Output:
|
||||
|
||||
Generated Uri: {ackUri.AbsoluteUri}");
|
||||
}
|
||||
return ackUri;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -198,10 +269,22 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
public Uri GetJobStatusUri(string jobId)
|
||||
{
|
||||
var processingJobSettings = _settings as ProcessingJobSettings;
|
||||
var jobStatusUri = new UriBuilder(GetAosRequestUri("api/connector/jobstatus/" + processingJobSettings.ActivityId))
|
||||
var jobStatusUri = new UriBuilder(GetAosRequestUri(ConnectorApiActions.JobStatusPath + processingJobSettings.ActivityId))
|
||||
{
|
||||
Query = "jobId=" + jobId.Replace(@"""", "")
|
||||
};
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetJobStatusUri is being called.
|
||||
Parameters:
|
||||
|
||||
jobId: {jobId}
|
||||
|
||||
Output:
|
||||
|
||||
Generated uri: {jobStatusUri.Uri.AbsoluteUri}
|
||||
Generated query: {jobStatusUri.Query}");
|
||||
}
|
||||
return jobStatusUri.Uri;
|
||||
}
|
||||
|
||||
|
@ -209,95 +292,145 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
/// Gets temporary writable location
|
||||
/// </summary>
|
||||
/// <returns>temp writable cloud url</returns>
|
||||
public async Task<string> GetAzureWriteUrl()
|
||||
public async Task<HttpResponseMessage> GetAzureWriteUrl()
|
||||
{
|
||||
var requestUri = GetAosRequestUri(_settings.GetAzureWriteUrlActionPath);
|
||||
|
||||
string uniqueFileName = Guid.NewGuid().ToString();
|
||||
var parameters = new { uniqueFileName };
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetAzureWriteUrl is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
uniqueFileName: {uniqueFileName}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (response.IsSuccessStatusCode)
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
string result = response.Content.ReadAsStringAsync().Result;
|
||||
JObject jsonResponse = (JObject)JsonConvert.DeserializeObject(result);
|
||||
string jvalue = jsonResponse["value"].ToString();
|
||||
return jvalue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.GetAzureWriteUrl request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
return null;
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks execution status of a Job
|
||||
/// </summary>
|
||||
/// <param name="executionId">execution Id</param>
|
||||
/// <returns>job's execution status</returns>
|
||||
public async Task<string> GetExecutionSummaryStatus(string executionId)
|
||||
/// <returns>Http response</returns>
|
||||
public async Task<HttpResponseMessage> GetExecutionSummaryStatus(string executionId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var requestUri = GetAosRequestUri(_settings.GetExecutionSummaryStatusActionPath);
|
||||
var requestUri = GetAosRequestUri(_settings.GetExecutionSummaryStatusActionPath);
|
||||
|
||||
var parameters = new { executionId };
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
var parameters = new { executionId };
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetExecutionSummaryStatus is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
Parameters:
|
||||
|
||||
string result = response.Content.ReadAsStringAsync().Result;
|
||||
JObject jsonResponse = (JObject)JsonConvert.DeserializeObject(result);
|
||||
return jsonResponse["value"].ToString();
|
||||
executionId: {executionId}");
|
||||
}
|
||||
catch
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
return "Bad request";
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.GetExecutionSummaryStatus request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets exported package Url location
|
||||
/// </summary>
|
||||
/// <param name="executionId">execution Id</param>
|
||||
/// <returns>exorted package Url location</returns>
|
||||
public async Task<Uri> GetExportedPackageUrl(string executionId)
|
||||
/// <returns>Http response</returns>
|
||||
public async Task<HttpResponseMessage> GetExportedPackageUrl(string executionId)
|
||||
{
|
||||
try
|
||||
{
|
||||
var requestUri = GetAosRequestUri(_settings.GetExportedPackageUrlActionPath);
|
||||
var requestUri = GetAosRequestUri(_settings.GetExportedPackageUrlActionPath);
|
||||
|
||||
var parameters = new { executionId };
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
string result = response.Content.ReadAsStringAsync().Result;
|
||||
JObject jsonResponse = (JObject)JsonConvert.DeserializeObject(result);
|
||||
string jvalue = jsonResponse["value"].ToString();
|
||||
return new Uri(jvalue);
|
||||
}
|
||||
catch
|
||||
var parameters = new { executionId };
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
return null;
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetExportedPackageUrl is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.GetExportedPackageUrl request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets execution's summary page Url
|
||||
/// </summary>
|
||||
/// <param name="executionId">execution Id</param>
|
||||
/// <returns>execution's summary page Url</returns>
|
||||
public async Task<string> GetExecutionSummaryPageUrl(string executionId)
|
||||
/// <returns>Http response</returns>
|
||||
public async Task<HttpResponseMessage> GetExecutionSummaryPageUrl(string executionId)
|
||||
{
|
||||
var requestUri = GetAosRequestUri(_settings.GetExecutionSummaryPageUrlActionPath);
|
||||
|
||||
var parameters = new { executionId };
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetExecutionSummaryPageUrl is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
string result = response.Content.ReadAsStringAsync().Result;
|
||||
JObject jsonResponse = (JObject)JsonConvert.DeserializeObject(result);
|
||||
return jsonResponse["value"].ToString();
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.GetExecutionSummaryPageUrl request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -312,13 +445,27 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
_httpClient.DefaultRequestHeaders.Add("x-ms-date", DateTime.UtcNow.ToString("R", System.Globalization.CultureInfo.InvariantCulture));
|
||||
_httpClient.DefaultRequestHeaders.Add("x-ms-blob-type", "BlockBlob");
|
||||
_httpClient.DefaultRequestHeaders.Add("Overwrite", "T");
|
||||
return await _retryPolicy.ExecuteAsync(() => _httpClient.PutAsync(blobUrl.AbsoluteUri, new StreamContent(stream)));
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.UploadContentsToBlob is being called.
|
||||
Uri: {blobUrl.AbsoluteUri}");
|
||||
}
|
||||
var response = await _httpClient.PutAsync(blobUrl.AbsoluteUri, new StreamContent(stream));
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.UploadContentsToBlob request failed.
|
||||
Uri: {blobUrl.AbsoluteUri}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Request to import package from specified location
|
||||
/// </summary>
|
||||
/// <param name="odataActionPath">Relative path to the Odata action</param>
|
||||
/// <param name="packageUrl">Location of uploaded package</param>
|
||||
/// <param name="definitionGroupId">Data project name</param>
|
||||
/// <param name="executionId">Execution Id</param>
|
||||
|
@ -340,7 +487,40 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
legalEntityId
|
||||
};
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
return await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.ImportFromPackage is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
packageUrl: {packageUrl}
|
||||
definitionGroupId: {definitionGroupId}
|
||||
executionId: {executionId}
|
||||
execute: {execute}
|
||||
overwrite: {overwrite}
|
||||
legalEntityId: {legalEntityId}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.ImportFromPackage request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
packageUrl: {packageUrl}
|
||||
definitionGroupId: {definitionGroupId}
|
||||
executionId: {executionId}
|
||||
execute: {execute}
|
||||
overwrite: {overwrite}
|
||||
legalEntityId: {legalEntityId}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -348,23 +528,41 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
/// </summary>
|
||||
/// <param name="executionId">execution Id</param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> DeleteExecutionHistoryJob(string executionId)
|
||||
public async Task<HttpResponseMessage> DeleteExecutionHistoryJob(string executionId)
|
||||
{
|
||||
var requestUri = GetAosRequestUri(_settings.DeleteExecutionHistoryJobActionPath);
|
||||
|
||||
var parameters = new { executionId };
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.DeleteExecutionHistoryJob is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
string result = response.Content.ReadAsStringAsync().Result;
|
||||
JObject jsonResponse = (JObject)JsonConvert.DeserializeObject(result);
|
||||
return jsonResponse["value"].ToString();
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.DeleteExecutionHistoryJob request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export a package that has been already uploaded to server
|
||||
/// </summary>
|
||||
/// <param name="odataActionPath">Relative path to the Odata action</param>
|
||||
/// <param name="definitionGroupId">data project name</param>
|
||||
/// <param name="packageName">package name </param>
|
||||
/// <param name="executionId">execution id to use for results</param>
|
||||
|
@ -384,7 +582,38 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
legalEntityId
|
||||
};
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
return await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.ExportToPackage is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
definitionGroupId: {definitionGroupId}
|
||||
packageName: {packageName}
|
||||
executionId: {executionId}
|
||||
reExecute: {reExecute}
|
||||
legalEntityId: {legalEntityId}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.ExportToPackage request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
definitionGroupId: {definitionGroupId}
|
||||
packageName: {packageName}
|
||||
executionId: {executionId}
|
||||
reExecute: {reExecute}
|
||||
legalEntityId: {legalEntityId}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -411,7 +640,40 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
legalEntityId
|
||||
};
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
return await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.ExportFromPackage is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
packageUrl: {packageUrl}
|
||||
definitionGroupId: {definitionGroupId}
|
||||
executionId: {executionId}
|
||||
execute: {execute}
|
||||
overwrite: {overwrite}
|
||||
legalEntityId: {legalEntityId}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.ExportFromPackage request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
packageUrl: {packageUrl}
|
||||
definitionGroupId: {definitionGroupId}
|
||||
executionId: {executionId}
|
||||
execute: {execute}
|
||||
overwrite: {overwrite}
|
||||
legalEntityId: {legalEntityId}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -419,28 +681,35 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
/// </summary>
|
||||
/// <param name="messageId">Message Id</param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetMessageStatus(string messageId)
|
||||
public async Task<HttpResponseMessage> GetMessageStatus(string messageId)
|
||||
{
|
||||
var requestUri = GetAosRequestUri(_settings.GetMessageStatusActionPath);
|
||||
var parameters = new
|
||||
{
|
||||
messageId
|
||||
};
|
||||
var parameters = new { messageId };
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetMessageStatus is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
messageId: {messageId}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
|
||||
if (response.IsSuccessStatusCode)
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
string result = response.Content.ReadAsStringAsync().Result;
|
||||
JObject jsonResponse = (JObject)JsonConvert.DeserializeObject(result);
|
||||
string jvalue = jsonResponse["value"].ToString();
|
||||
//var status = (IntegrationActivityMessageStatus)Enum.Parse(typeof(IntegrationActivityMessageStatus), statusString);
|
||||
return jvalue;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.GetMessageStatus request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
messageId: {messageId}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
|
||||
}
|
||||
|
||||
|
@ -450,7 +719,7 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
/// <param name="executionId">Execution Id</param>
|
||||
/// <param name="entityName">Entity name</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> GenerateImportTargetErrorKeysFile(string executionId, string entityName)
|
||||
public async Task<HttpResponseMessage> GenerateImportTargetErrorKeysFile(string executionId, string entityName)
|
||||
{
|
||||
var requestUri = GetAosRequestUri(_settings.GenerateImportTargetErrorKeysFilePath);
|
||||
|
||||
|
@ -460,17 +729,32 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
entityName
|
||||
};
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GenerateImportTargetErrorKeysFile is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}
|
||||
entityName: {entityName}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (response.IsSuccessStatusCode)
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
string result = response.Content.ReadAsStringAsync().Result;
|
||||
JObject jsonResponse = (JObject)JsonConvert.DeserializeObject(result);
|
||||
return Convert.ToBoolean(jsonResponse["value"].ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.GenerateImportTargetErrorKeysFile request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}
|
||||
entityName: {entityName}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -479,7 +763,7 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
/// <param name="executionId">Execution Id</param>
|
||||
/// <param name="entityName">Entity name</param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetImportTargetErrorKeysFileUrl(string executionId, string entityName)
|
||||
public async Task<HttpResponseMessage> GetImportTargetErrorKeysFileUrl(string executionId, string entityName)
|
||||
{
|
||||
var requestUri = GetAosRequestUri(_settings.GetImportTargetErrorKeysFileUrlPath);
|
||||
|
||||
|
@ -489,17 +773,32 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
entityName
|
||||
};
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetImportTargetErrorKeysFileUrl is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}
|
||||
entityName: {entityName}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (response.IsSuccessStatusCode)
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
string result = response.Content.ReadAsStringAsync().Result;
|
||||
JObject jsonResponse = (JObject)JsonConvert.DeserializeObject(result);
|
||||
return jsonResponse["value"].ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
return "";
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.GetImportTargetErrorKeysFileUrl request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}
|
||||
entityName: {entityName}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -511,20 +810,32 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
{
|
||||
var requestUri = GetAosRequestUri(_settings.GetExecutionErrorsPath);
|
||||
|
||||
var parameters = new
|
||||
{
|
||||
executionId
|
||||
};
|
||||
var parameters = new { executionId };
|
||||
string parametersJson = JsonConvert.SerializeObject(parameters, new JsonSerializerSettings { TypeNameHandling = TypeNameHandling.Auto });
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug($@"Job: {_settings.JobKey}. HttpClientHelper.GetExecutionErrors is being called.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}");
|
||||
}
|
||||
var response = await PostStringRequestAsync(requestUri, parametersJson);
|
||||
if (response.IsSuccessStatusCode)
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
return response;
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
Log.Error($@"Job: {_settings.JobKey}. HttpClientHelper.GetExecutionErrors request failed.
|
||||
Uri: {requestUri}
|
||||
|
||||
Parameters:
|
||||
|
||||
executionId: {executionId}
|
||||
|
||||
Response status code: {response.StatusCode}
|
||||
Response reason: {response.ReasonPhrase}
|
||||
Response message: {response.Content}");
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
private Uri GetAosRequestUri(string requestRelativePath)
|
||||
|
@ -537,6 +848,13 @@ namespace RecurringIntegrationsScheduler.Common.Helpers
|
|||
return builder.Uri;
|
||||
}
|
||||
|
||||
public static string ReadResponseString(HttpResponseMessage response)
|
||||
{
|
||||
string result = response.Content.ReadAsStringAsync().Result;
|
||||
JObject jsonResponse = (JObject)JsonConvert.DeserializeObject(result);
|
||||
return jsonResponse["value"].ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dispose
|
||||
/// </summary>
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
/* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the MIT License. */
|
||||
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RecurringIntegrationsScheduler.Common.Helpers
|
||||
{
|
||||
public class HttpRetryHandler : DelegatingHandler
|
||||
{
|
||||
private readonly int maxRetries;
|
||||
private readonly int delayBetweenRetries;
|
||||
|
||||
public HttpRetryHandler(HttpMessageHandler innerHandler, int retries = 3, int delay = 1)
|
||||
: base(innerHandler)
|
||||
{
|
||||
maxRetries = retries;
|
||||
delayBetweenRetries = delay;
|
||||
}
|
||||
|
||||
protected override async Task<HttpResponseMessage> SendAsync(
|
||||
HttpRequestMessage request,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
HttpResponseMessage response = null;
|
||||
for (int i = 0; i < maxRetries; i++)
|
||||
{
|
||||
response = await base.SendAsync(request, cancellationToken);
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
return response;
|
||||
}
|
||||
if (delayBetweenRetries > 0 )
|
||||
{
|
||||
Thread.Sleep(TimeSpan.FromSeconds(delayBetweenRetries));
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -100,76 +100,80 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
ImportFromPackageActionPath = dataMap.GetString(SettingsConstants.ImportFromPackageActionPath);
|
||||
if (string.IsNullOrEmpty(ImportFromPackageActionPath))
|
||||
{
|
||||
ImportFromPackageActionPath = OdataActionsConstants.ImportFromPackageActionPath;
|
||||
ImportFromPackageActionPath = PackageApiActions.ImportFromPackageActionPath;
|
||||
}
|
||||
|
||||
GetAzureWriteUrlActionPath = dataMap.GetString(SettingsConstants.GetAzureWriteUrlActionPath);
|
||||
if (string.IsNullOrEmpty(GetAzureWriteUrlActionPath))
|
||||
{
|
||||
GetAzureWriteUrlActionPath = OdataActionsConstants.GetAzureWriteUrlActionPath;
|
||||
GetAzureWriteUrlActionPath = PackageApiActions.GetAzureWriteUrlActionPath;
|
||||
}
|
||||
|
||||
GetExecutionSummaryStatusActionPath = dataMap.GetString(SettingsConstants.GetExecutionSummaryStatusActionPath);
|
||||
if (string.IsNullOrEmpty(GetExecutionSummaryStatusActionPath))
|
||||
{
|
||||
GetExecutionSummaryStatusActionPath = OdataActionsConstants.GetExecutionSummaryStatusActionPath;
|
||||
GetExecutionSummaryStatusActionPath = PackageApiActions.GetExecutionSummaryStatusActionPath;
|
||||
}
|
||||
|
||||
GetExportedPackageUrlActionPath = dataMap.GetString(SettingsConstants.GetExportedPackageUrlActionPath);
|
||||
if (string.IsNullOrEmpty(GetExportedPackageUrlActionPath))
|
||||
{
|
||||
GetExportedPackageUrlActionPath = OdataActionsConstants.GetExportedPackageUrlActionPath;
|
||||
GetExportedPackageUrlActionPath = PackageApiActions.GetExportedPackageUrlActionPath;
|
||||
}
|
||||
|
||||
GetExecutionSummaryPageUrlActionPath = dataMap.GetString(SettingsConstants.GetExecutionSummaryPageUrlActionPath);
|
||||
if (string.IsNullOrEmpty(GetExecutionSummaryPageUrlActionPath))
|
||||
{
|
||||
GetExecutionSummaryPageUrlActionPath = OdataActionsConstants.GetExecutionSummaryPageUrlActionPath;
|
||||
GetExecutionSummaryPageUrlActionPath = PackageApiActions.GetExecutionSummaryPageUrlActionPath;
|
||||
}
|
||||
|
||||
DeleteExecutionHistoryJobActionPath = dataMap.GetString(SettingsConstants.DeleteExecutionHistoryJobActionPath);
|
||||
if (string.IsNullOrEmpty(DeleteExecutionHistoryJobActionPath))
|
||||
{
|
||||
DeleteExecutionHistoryJobActionPath = OdataActionsConstants.DeleteExecutionHistoryJobActionPath;
|
||||
DeleteExecutionHistoryJobActionPath = PackageApiActions.DeleteExecutionHistoryJobActionPath;
|
||||
}
|
||||
|
||||
ExportToPackageActionPath = dataMap.GetString(SettingsConstants.ExportToPackageActionPath);
|
||||
if (string.IsNullOrEmpty(ExportToPackageActionPath))
|
||||
{
|
||||
ExportToPackageActionPath = OdataActionsConstants.ExportToPackageActionPath;
|
||||
ExportToPackageActionPath = PackageApiActions.ExportToPackageActionPath;
|
||||
}
|
||||
|
||||
ExportFromPackageActionPath = dataMap.GetString(SettingsConstants.ExportFromPackageActionPath);
|
||||
if (string.IsNullOrEmpty(ExportFromPackageActionPath))
|
||||
{
|
||||
ExportFromPackageActionPath = OdataActionsConstants.ExportFromPackageActionPath;
|
||||
ExportFromPackageActionPath = PackageApiActions.ExportFromPackageActionPath;
|
||||
}
|
||||
|
||||
GetMessageStatusActionPath = dataMap.GetString(SettingsConstants.GetMessageStatusActionPath);
|
||||
if (string.IsNullOrEmpty(GetMessageStatusActionPath))
|
||||
{
|
||||
GetMessageStatusActionPath = OdataActionsConstants.GetMessageStatusActionPath;
|
||||
GetMessageStatusActionPath = PackageApiActions.GetMessageStatusActionPath;
|
||||
}
|
||||
|
||||
GetImportTargetErrorKeysFileUrlPath = dataMap.GetString(SettingsConstants.GetImportTargetErrorKeysFileUrlPath);
|
||||
if (string.IsNullOrEmpty(GetImportTargetErrorKeysFileUrlPath))
|
||||
{
|
||||
GetImportTargetErrorKeysFileUrlPath = OdataActionsConstants.GetImportTargetErrorKeysFileUrlPath;
|
||||
GetImportTargetErrorKeysFileUrlPath = PackageApiActions.GetImportTargetErrorKeysFileUrlPath;
|
||||
}
|
||||
|
||||
GenerateImportTargetErrorKeysFilePath = dataMap.GetString(SettingsConstants.GenerateImportTargetErrorKeysFilePath);
|
||||
if (string.IsNullOrEmpty(GenerateImportTargetErrorKeysFilePath))
|
||||
{
|
||||
GenerateImportTargetErrorKeysFilePath = OdataActionsConstants.GenerateImportTargetErrorKeysFilePath;
|
||||
GenerateImportTargetErrorKeysFilePath = PackageApiActions.GenerateImportTargetErrorKeysFilePath;
|
||||
}
|
||||
|
||||
GetExecutionErrorsPath = dataMap.GetString(SettingsConstants.GetExecutionErrorsPath);
|
||||
if (string.IsNullOrEmpty(GetExecutionErrorsPath))
|
||||
{
|
||||
GetExecutionErrorsPath = OdataActionsConstants.GetExecutionErrorsPath;
|
||||
GetExecutionErrorsPath = PackageApiActions.GetExecutionErrorsPath;
|
||||
}
|
||||
|
||||
GetExecutionErrors = Convert.ToBoolean(dataMap.GetString(SettingsConstants.GetExecutionErrors));
|
||||
|
||||
LogVerbose = Convert.ToBoolean(dataMap.GetString(SettingsConstants.LogVerbose));
|
||||
|
||||
JobKey = context.JobDetail.Key.ToString();
|
||||
}
|
||||
|
||||
#region Members
|
||||
|
@ -284,7 +288,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the ImportFromPackage Odata action
|
||||
/// </value>
|
||||
public string ImportFromPackageActionPath { get; private set; } = OdataActionsConstants.ImportFromPackageActionPath;
|
||||
public string ImportFromPackageActionPath { get; private set; } = PackageApiActions.ImportFromPackageActionPath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the GetAzureWriteUrl Odata action relative path
|
||||
|
@ -292,7 +296,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the GetAzureWriteUrl Odata action
|
||||
/// </value>
|
||||
public string GetAzureWriteUrlActionPath { get; private set; } = OdataActionsConstants.GetAzureWriteUrlActionPath;
|
||||
public string GetAzureWriteUrlActionPath { get; private set; } = PackageApiActions.GetAzureWriteUrlActionPath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the GetExecutionSummaryStatus Odata action relative path
|
||||
|
@ -300,7 +304,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the GetExecutionSummaryStatus Odata action
|
||||
/// </value>
|
||||
public string GetExecutionSummaryStatusActionPath { get; private set; } = OdataActionsConstants.GetExecutionSummaryStatusActionPath;
|
||||
public string GetExecutionSummaryStatusActionPath { get; private set; } = PackageApiActions.GetExecutionSummaryStatusActionPath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the GetExportedPackageUrl Odata action relative path
|
||||
|
@ -308,7 +312,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the GetExportedPackageUrl Odata action
|
||||
/// </value>
|
||||
public string GetExportedPackageUrlActionPath { get; private set; } = OdataActionsConstants.GetExportedPackageUrlActionPath;
|
||||
public string GetExportedPackageUrlActionPath { get; private set; } = PackageApiActions.GetExportedPackageUrlActionPath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the GetExecutionSummaryPageUrl Odata action relative path
|
||||
|
@ -316,7 +320,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the GetExecutionSummaryPageUrl Odata action
|
||||
/// </value>
|
||||
public string GetExecutionSummaryPageUrlActionPath { get; private set; } = OdataActionsConstants.GetExecutionSummaryPageUrlActionPath;
|
||||
public string GetExecutionSummaryPageUrlActionPath { get; private set; } = PackageApiActions.GetExecutionSummaryPageUrlActionPath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the DeleteExecutionHistoryJob Odata action relative path
|
||||
|
@ -324,7 +328,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the DeleteExecutionHistoryJob Odata action
|
||||
/// </value>
|
||||
public string DeleteExecutionHistoryJobActionPath { get; private set; } = OdataActionsConstants.DeleteExecutionHistoryJobActionPath;
|
||||
public string DeleteExecutionHistoryJobActionPath { get; private set; } = PackageApiActions.DeleteExecutionHistoryJobActionPath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the ExportToPackage Odata action relative path
|
||||
|
@ -332,7 +336,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the ExportToPackage Odata action
|
||||
/// </value>
|
||||
public string ExportToPackageActionPath { get; private set; } = OdataActionsConstants.ExportToPackageActionPath;
|
||||
public string ExportToPackageActionPath { get; private set; } = PackageApiActions.ExportToPackageActionPath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the ExportFromPackage Odata action relative path
|
||||
|
@ -340,7 +344,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the ExportFromPackage Odata action
|
||||
/// </value>
|
||||
public string ExportFromPackageActionPath { get; private set; } = OdataActionsConstants.ExportFromPackageActionPath;
|
||||
public string ExportFromPackageActionPath { get; private set; } = PackageApiActions.ExportFromPackageActionPath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the GetMessageStatus Odata action relative path
|
||||
|
@ -348,7 +352,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the GetMessageStatus Odata action
|
||||
/// </value>
|
||||
public string GetMessageStatusActionPath { get; private set; } = OdataActionsConstants.GetMessageStatusActionPath;
|
||||
public string GetMessageStatusActionPath { get; private set; } = PackageApiActions.GetMessageStatusActionPath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the GetImportTargetErrorKeysFileUrl Odata action relative path
|
||||
|
@ -356,7 +360,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the GetImportTargetErrorKeysFileUrl Odata action
|
||||
/// </value>
|
||||
public string GetImportTargetErrorKeysFileUrlPath { get; private set; } = OdataActionsConstants.GetImportTargetErrorKeysFileUrlPath;
|
||||
public string GetImportTargetErrorKeysFileUrlPath { get; private set; } = PackageApiActions.GetImportTargetErrorKeysFileUrlPath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the GenerateImportTargetErrorKeysFile Odata action relative path
|
||||
|
@ -364,7 +368,7 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the GenerateImportTargetErrorKeysFile Odata action
|
||||
/// </value>
|
||||
public string GenerateImportTargetErrorKeysFilePath { get; private set; } = OdataActionsConstants.GenerateImportTargetErrorKeysFilePath;
|
||||
public string GenerateImportTargetErrorKeysFilePath { get; private set; } = PackageApiActions.GenerateImportTargetErrorKeysFilePath;
|
||||
|
||||
/// <summary>
|
||||
/// Get the GetExecutionErrors Odata action relative path
|
||||
|
@ -372,16 +376,32 @@ namespace RecurringIntegrationsScheduler.Common.JobSettings
|
|||
/// <value>
|
||||
/// The relative path to the GetExecutionErrors Odata action
|
||||
/// </value>
|
||||
public string GetExecutionErrorsPath { get; private set; } = OdataActionsConstants.GetExecutionErrorsPath;
|
||||
public string GetExecutionErrorsPath { get; private set; } = PackageApiActions.GetExecutionErrorsPath;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to retrieve execution errors.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if [gt executon errors]; otherwise, <c>false</c>.
|
||||
/// <c>true</c> if [get executon errors]; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool GetExecutionErrors { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to log verbose.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// <c>true</c> if [Log verbose]; otherwise, <c>false</c>.
|
||||
/// </value>
|
||||
public bool LogVerbose { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Get the Job key
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// Job key identifier
|
||||
/// </value>
|
||||
public string JobKey { get; private set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -14,7 +14,6 @@ using System.Collections.Concurrent;
|
|||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RecurringIntegrationsScheduler.Job
|
||||
|
@ -68,11 +67,6 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// </summary>
|
||||
private Policy _retryPolicyForIo;
|
||||
|
||||
/// <summary>
|
||||
/// Retry policy for HTTP operations
|
||||
/// </summary>
|
||||
private Polly.Retry.AsyncRetryPolicy _retryPolicyForHttp;
|
||||
|
||||
/// <summary>
|
||||
/// Called by the <see cref="T:Quartz.IScheduler" /> when a <see cref="T:Quartz.ITrigger" />
|
||||
/// fires that is associated with the <see cref="T:Quartz.IJob" />.
|
||||
|
@ -110,21 +104,17 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_IO_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
_retryPolicyForHttp = Policy.Handle<HttpRequestException>().WaitAndRetryAsync(
|
||||
retryCount: _settings.RetryCount,
|
||||
sleepDurationProvider: attempt => TimeSpan.FromSeconds(_settings.RetryDelay),
|
||||
onRetry: (exception, calculatedWaitDuration) =>
|
||||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_Http_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_starting, _context.JobDetail.Key));
|
||||
|
||||
}
|
||||
await Process();
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_ended, _context.JobDetail.Key));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -134,30 +124,18 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
Log.WarnFormat(CultureInfo.InvariantCulture,
|
||||
string.Format(Resources.Job_0_was_paused_because_of_error, _context.JobDetail.Key));
|
||||
}
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.Message))
|
||||
{
|
||||
Log.Error(ex.Message, ex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error("Unknown exception", ex);
|
||||
}
|
||||
|
||||
while (ex.InnerException != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.InnerException.Message))
|
||||
Log.Error(ex.InnerException.Message, ex.InnerException);
|
||||
|
||||
ex = ex.InnerException;
|
||||
}
|
||||
}
|
||||
if (context.Scheduler.SchedulerName != "Private")//only throw error when running as service
|
||||
{
|
||||
throw new JobExecutionException(string.Format(Resources.Download_job_0_failed, _context.JobDetail.Key), ex, false);
|
||||
|
||||
if (!Log.IsDebugEnabled)
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -168,7 +146,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
private async Task Process()
|
||||
{
|
||||
DownloadQueue = new ConcurrentQueue<DataMessage>();
|
||||
_httpClientHelper = new HttpClientHelper(_settings, _retryPolicyForHttp);
|
||||
_httpClientHelper = new HttpClientHelper(_settings);
|
||||
_dequeueUri = _httpClientHelper.GetDequeueUri();
|
||||
_acknowledgeDownloadUri = _httpClientHelper.GetAckUri();
|
||||
|
||||
|
@ -231,8 +209,9 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
var response = await _httpClientHelper.GetRequestAsync(new UriBuilder(dataMessage.DownloadLocation).Uri);
|
||||
|
||||
if (!response.IsSuccessStatusCode)
|
||||
throw new Exception(string.Format(Resources.Job_0_Download_failure_1, _context.JobDetail.Key, response.StatusCode));
|
||||
|
||||
{
|
||||
throw new JobExecutionException(string.Format(Resources.Job_0_Download_failure_1, _context.JobDetail.Key, response.StatusCode));
|
||||
}
|
||||
using (var downloadedStream = await response.Content.ReadAsStreamAsync())
|
||||
{
|
||||
if(fileCount > 0 && _settings.DelayBetweenFiles > 0) //Only delay after first file and never after last.
|
||||
|
@ -252,13 +231,16 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
|
||||
_retryPolicyForIo.Execute(() => FileOperationsHelper.Create(downloadedStream, dataMessage.FullPath));
|
||||
}
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_File_1_was_downloaded, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}")));
|
||||
|
||||
}
|
||||
await AcknowledgeDownload(dataMessage);
|
||||
|
||||
if (_settings.UnzipPackage)
|
||||
{
|
||||
_retryPolicyForIo.Execute(() => FileOperationsHelper.UnzipPackage(dataMessage.FullPath, _settings.DeletePackage, _settings.AddTimestamp));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -273,10 +255,12 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
|
||||
var response = await _httpClientHelper.PostStringRequestAsync(_acknowledgeDownloadUri, content);
|
||||
|
||||
if (response.StatusCode == HttpStatusCode.OK)
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_File_1_was_acknowledged_successfully, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}")));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -62,11 +62,6 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// </summary>
|
||||
private Policy _retryPolicyForIo;
|
||||
|
||||
/// <summary>
|
||||
/// Retry policy for HTTP operations
|
||||
/// </summary>
|
||||
private Polly.Retry.AsyncRetryPolicy _retryPolicyForHttp;
|
||||
|
||||
/// <summary>
|
||||
/// Called by the <see cref="T:Quartz.IScheduler" /> when a <see cref="T:Quartz.ITrigger" />
|
||||
/// fires that is associated with the <see cref="T:Quartz.IJob" />.
|
||||
|
@ -104,53 +99,37 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_IO_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
_retryPolicyForHttp = Policy.Handle<HttpRequestException>().WaitAndRetryAsync(
|
||||
retryCount: _settings.RetryCount,
|
||||
sleepDurationProvider: attempt => TimeSpan.FromSeconds(_settings.RetryDelay),
|
||||
onRetry: (exception, calculatedWaitDuration) =>
|
||||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_Http_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
if (Log.IsDebugEnabled)
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_starting, _context.JobDetail.Key));
|
||||
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_starting, _context.JobDetail.Key));
|
||||
}
|
||||
await Process();
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_ended, _context.JobDetail.Key));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_settings.PauseJobOnException)
|
||||
{
|
||||
await context.Scheduler.PauseJob(context.JobDetail.Key);
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture,
|
||||
string.Format(Resources.Job_0_was_paused_because_of_error, _context.JobDetail.Key));
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_was_paused_because_of_error, _context.JobDetail.Key));
|
||||
}
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.Message))
|
||||
{
|
||||
Log.Error(ex.Message, ex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error("Unknown exception", ex);
|
||||
}
|
||||
|
||||
while (ex.InnerException != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.InnerException.Message))
|
||||
Log.Error(ex.InnerException.Message, ex.InnerException);
|
||||
|
||||
ex = ex.InnerException;
|
||||
}
|
||||
}
|
||||
if (context.Scheduler.SchedulerName != "Private")
|
||||
{
|
||||
throw new JobExecutionException(string.Format(Resources.Execution_monitor_job_0_failed, _context.JobDetail.Key), ex, false);
|
||||
|
||||
if (!Log.IsDebugEnabled)
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -163,15 +142,17 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
EnqueuedJobs = new ConcurrentQueue<DataMessage>();
|
||||
foreach (var dataMessage in FileOperationsHelper.GetStatusFiles(MessageStatus.InProcess, _settings.UploadSuccessDir, "*" + _settings.StatusFileExtension))
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture,
|
||||
string.Format(Resources.Job_0_File_1_found_in_processing_location_and_added_to_queue_for_status_check, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}")));
|
||||
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_File_1_found_in_processing_location_and_added_to_queue_for_status_check, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}")));
|
||||
}
|
||||
EnqueuedJobs.Enqueue(dataMessage);
|
||||
}
|
||||
|
||||
if (!EnqueuedJobs.IsEmpty)
|
||||
{
|
||||
await ProcessEnqueuedQueue();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -181,7 +162,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
private async Task ProcessEnqueuedQueue()
|
||||
{
|
||||
var fileCount = 0;
|
||||
_httpClientHelper = new HttpClientHelper(_settings, _retryPolicyForHttp);
|
||||
_httpClientHelper = new HttpClientHelper(_settings);
|
||||
|
||||
while (EnqueuedJobs.TryDequeue(out DataMessage dataMessage))
|
||||
{
|
||||
|
@ -192,11 +173,18 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
fileCount++;
|
||||
|
||||
// Check status for current item with message id - item.Key
|
||||
var jobStatusDetail = await _httpClientHelper.GetExecutionSummaryStatus(dataMessage.MessageId);
|
||||
var responseGetExecutionSummaryStatus = await _httpClientHelper.GetExecutionSummaryStatus(dataMessage.MessageId);
|
||||
if(!responseGetExecutionSummaryStatus.IsSuccessStatusCode)
|
||||
{
|
||||
throw new JobExecutionException($@"Job: {_settings.JobKey}. GetExecutionSummaryStatus request failed.");
|
||||
}
|
||||
var jobStatusDetail = HttpClientHelper.ReadResponseString(responseGetExecutionSummaryStatus);
|
||||
|
||||
// If status was found and is not null,
|
||||
if (jobStatusDetail != null)
|
||||
{
|
||||
await PostProcessMessage(jobStatusDetail, dataMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -208,9 +196,10 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// <param name="dataMessage">Name of the file whose status is being processed</param>
|
||||
private async Task PostProcessMessage(string executionStatus, DataMessage dataMessage)
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture,
|
||||
string.Format(Resources.Job_0_ExecutionId_1_status_check_returned_2, _context.JobDetail.Key, dataMessage.MessageId, executionStatus));
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_ExecutionId_1_status_check_returned_2, _context.JobDetail.Key, dataMessage.MessageId, executionStatus));
|
||||
}
|
||||
switch (executionStatus)
|
||||
{
|
||||
case "Succeeded":
|
||||
|
@ -231,7 +220,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
await CreateLinkToExecutionSummaryPage(dataMessage.MessageId, processingErrorDestination);
|
||||
if (_settings.GetImportTargetErrorKeysFile)
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Checking_if_error_keys_file_was_generated, _context.JobDetail.Key));
|
||||
}
|
||||
|
@ -243,62 +232,81 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
var entitiesInPackage = GetEntitiesNamesInPackage(fileWithManifest);
|
||||
foreach(var entity in entitiesInPackage)
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Checking_for_error_keys_for_data_entity_1, _context.JobDetail.Key, entity));
|
||||
}
|
||||
var errorsExist = await _httpClientHelper.GenerateImportTargetErrorKeysFile(dataMessage.MessageId, entity);
|
||||
if (errorsExist)
|
||||
var errorsExistResponse = await _httpClientHelper.GenerateImportTargetErrorKeysFile(dataMessage.MessageId, entity);
|
||||
if (errorsExistResponse.IsSuccessStatusCode && Convert.ToBoolean(HttpClientHelper.ReadResponseString(errorsExistResponse)))
|
||||
{
|
||||
string errorFileUrl;
|
||||
var errorFileUrl = string.Empty;
|
||||
HttpResponseMessage errorFileUrlResponse;
|
||||
do
|
||||
{
|
||||
errorFileUrl = await _httpClientHelper.GetImportTargetErrorKeysFileUrl(dataMessage.MessageId, entity);
|
||||
if (errorFileUrl.Length == 0)
|
||||
errorFileUrlResponse = await _httpClientHelper.GetImportTargetErrorKeysFileUrl(dataMessage.MessageId, entity);
|
||||
if(errorFileUrlResponse.IsSuccessStatusCode)
|
||||
{
|
||||
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(_settings.DelayBetweenStatusCheck));//TODO
|
||||
errorFileUrl = HttpClientHelper.ReadResponseString(errorFileUrlResponse);
|
||||
if (errorFileUrl.Length == 0)
|
||||
{
|
||||
System.Threading.Thread.Sleep(TimeSpan.FromSeconds(_settings.DelayBetweenStatusCheck));
|
||||
}
|
||||
}
|
||||
}
|
||||
while (string.IsNullOrEmpty(errorFileUrl));
|
||||
while (errorFileUrlResponse.IsSuccessStatusCode && string.IsNullOrEmpty(errorFileUrl));
|
||||
|
||||
var response = await _httpClientHelper.GetRequestAsync(new UriBuilder(errorFileUrl).Uri, false);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
throw new JobExecutionException(string.Format(Resources.Job_0_download_of_error_keys_file_failed_1, _context.JobDetail.Key, string.Format($"Status: {response.StatusCode}. Message: {response.Content}")));
|
||||
|
||||
using Stream downloadedStream = await response.Content.ReadAsStreamAsync();
|
||||
var errorsFileName = $"{Path.GetFileNameWithoutExtension(dataMessage.Name)}-{entity}-ErrorKeys-{DateTime.Now:yyyy-MM-dd_HH-mm-ss-ffff}.txt";
|
||||
var errorsFilePath = Path.Combine(Path.GetDirectoryName(dataMessage.FullPath.Replace(_settings.UploadSuccessDir, _settings.ProcessingErrorsDir)), errorsFileName);
|
||||
var dataMessageForErrorsFile = new DataMessage()
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
FullPath = errorsFilePath,
|
||||
Name = errorsFileName,
|
||||
MessageStatus = MessageStatus.Failed
|
||||
};
|
||||
_retryPolicyForIo.Execute(() => FileOperationsHelper.Create(downloadedStream, dataMessageForErrorsFile.FullPath));
|
||||
using Stream downloadedStream = await response.Content.ReadAsStreamAsync();
|
||||
var errorsFileName = $"{Path.GetFileNameWithoutExtension(dataMessage.Name)}-{entity}-ErrorKeys-{DateTime.Now:yyyy-MM-dd_HH-mm-ss-ffff}.txt";
|
||||
var errorsFilePath = Path.Combine(Path.GetDirectoryName(dataMessage.FullPath.Replace(_settings.UploadSuccessDir, _settings.ProcessingErrorsDir)), errorsFileName);
|
||||
var dataMessageForErrorsFile = new DataMessage()
|
||||
{
|
||||
FullPath = errorsFilePath,
|
||||
Name = errorsFileName,
|
||||
MessageStatus = MessageStatus.Failed
|
||||
};
|
||||
_retryPolicyForIo.Execute(() => FileOperationsHelper.Create(downloadedStream, dataMessageForErrorsFile.FullPath));
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Warn($@"Job: {_settings.JobKey}. Download of error keys file failed. Job will continue processing other packages.
|
||||
Uploaded file: {dataMessage.FullPath}
|
||||
Execution status: {executionStatus}
|
||||
Error file URL: {errorFileUrl}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_settings.GetExecutionErrors)
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Trying_to_download_execution_errors, _context.JobDetail.Key));
|
||||
}
|
||||
var response = await _httpClientHelper.GetExecutionErrors(dataMessage.MessageId);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
throw new JobExecutionException(string.Format(Resources.Job_0_download_of_execution_errors_failed_1, _context.JobDetail.Key, string.Format($"Status: {response.StatusCode}. Message: {response.Content}")));
|
||||
|
||||
using Stream downloadedStream = await response.Content.ReadAsStreamAsync();
|
||||
var errorsFileName = $"{Path.GetFileNameWithoutExtension(dataMessage.Name)}-ExecutionErrors-{DateTime.Now:yyyy-MM-dd_HH-mm-ss-ffff}.txt";
|
||||
var errorsFilePath = Path.Combine(Path.GetDirectoryName(dataMessage.FullPath.Replace(_settings.UploadSuccessDir, _settings.ProcessingErrorsDir)), errorsFileName);
|
||||
var dataMessageForErrorsFile = new DataMessage()
|
||||
if (response.IsSuccessStatusCode)
|
||||
{
|
||||
FullPath = errorsFilePath,
|
||||
Name = errorsFileName,
|
||||
MessageStatus = MessageStatus.Failed
|
||||
};
|
||||
_retryPolicyForIo.Execute(() => FileOperationsHelper.Create(downloadedStream, dataMessageForErrorsFile.FullPath));
|
||||
using Stream downloadedStream = await response.Content.ReadAsStreamAsync();
|
||||
var errorsFileName = $"{Path.GetFileNameWithoutExtension(dataMessage.Name)}-ExecutionErrors-{DateTime.Now:yyyy-MM-dd_HH-mm-ss-ffff}.txt";
|
||||
var errorsFilePath = Path.Combine(Path.GetDirectoryName(dataMessage.FullPath.Replace(_settings.UploadSuccessDir, _settings.ProcessingErrorsDir)), errorsFileName);
|
||||
var dataMessageForErrorsFile = new DataMessage()
|
||||
{
|
||||
FullPath = errorsFilePath,
|
||||
Name = errorsFileName,
|
||||
MessageStatus = MessageStatus.Failed
|
||||
};
|
||||
_retryPolicyForIo.Execute(() => FileOperationsHelper.Create(downloadedStream, dataMessageForErrorsFile.FullPath));
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Warn($@"Job: {_settings.JobKey}. Download of execution error details failed. Job will continue processing other packages.
|
||||
Uploaded file: {dataMessage.FullPath}
|
||||
Execution status: {executionStatus}
|
||||
Message Id: {dataMessage.MessageId}");
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -332,7 +340,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// <returns>Entities list</returns>
|
||||
private List<string> GetEntitiesNamesInPackage(string fileName)
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Looking_for_data_entities_in_manifest_file_1, _context.JobDetail.Key, fileName));
|
||||
}
|
||||
|
|
|
@ -48,11 +48,6 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// </summary>
|
||||
private Policy _retryPolicyForIo;
|
||||
|
||||
/// <summary>
|
||||
/// Retry policy for HTTP operations
|
||||
/// </summary>
|
||||
private Polly.Retry.AsyncRetryPolicy _retryPolicyForHttp;
|
||||
|
||||
/// <summary>
|
||||
/// Called by the <see cref="T:Quartz.IScheduler" /> when a <see cref="T:Quartz.ITrigger" />
|
||||
/// fires that is associated with the <see cref="T:Quartz.IJob" />.
|
||||
|
@ -78,66 +73,48 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
if (_settings.IndefinitePause)
|
||||
{
|
||||
await context.Scheduler.PauseJob(context.JobDetail.Key);
|
||||
Log.InfoFormat(CultureInfo.InvariantCulture,
|
||||
string.Format(Resources.Job_0_was_paused_indefinitely, _context.JobDetail.Key));
|
||||
Log.InfoFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_was_paused_indefinitely, _context.JobDetail.Key));
|
||||
return;
|
||||
}
|
||||
|
||||
_retryPolicyForIo = Policy.Handle<IOException>().WaitAndRetry(
|
||||
retryCount: _settings.RetryCount,
|
||||
retryCount: _settings.RetryCount,
|
||||
sleepDurationProvider: attempt => TimeSpan.FromSeconds(_settings.RetryDelay),
|
||||
onRetry: (exception, calculatedWaitDuration) =>
|
||||
onRetry: (exception, calculatedWaitDuration) =>
|
||||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_IO_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
_retryPolicyForHttp = Policy.Handle<HttpRequestException>().WaitAndRetryAsync(
|
||||
retryCount: _settings.RetryCount,
|
||||
sleepDurationProvider: attempt => TimeSpan.FromSeconds(_settings.RetryDelay),
|
||||
onRetry: (exception, calculatedWaitDuration) =>
|
||||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_Http_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_starting, _context.JobDetail.Key));
|
||||
|
||||
}
|
||||
await Process();
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_ended, _context.JobDetail.Key));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_settings.PauseJobOnException)
|
||||
{
|
||||
await context.Scheduler.PauseJob(context.JobDetail.Key);
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture,
|
||||
string.Format(Resources.Job_0_was_paused_because_of_error, _context.JobDetail.Key));
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_was_paused_because_of_error, _context.JobDetail.Key));
|
||||
}
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.Message))
|
||||
{
|
||||
Log.Error(ex.Message, ex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error("Unknown exception", ex);
|
||||
}
|
||||
|
||||
while (ex.InnerException != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.InnerException.Message))
|
||||
Log.Error(ex.InnerException.Message, ex.InnerException);
|
||||
|
||||
ex = ex.InnerException;
|
||||
}
|
||||
}
|
||||
if (context.Scheduler.SchedulerName != "Private")
|
||||
{
|
||||
throw new JobExecutionException(string.Format(Resources.Job_0_failed, _context.JobDetail.Key), ex, false);
|
||||
|
||||
if (!Log.IsDebugEnabled)
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,13 +124,16 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// <returns></returns>
|
||||
private async Task Process()
|
||||
{
|
||||
using (_httpClientHelper = new HttpClientHelper(_settings, _retryPolicyForHttp))
|
||||
using (_httpClientHelper = new HttpClientHelper(_settings))
|
||||
{
|
||||
var executionId = CreateExecutionId(_settings.DataProject);
|
||||
var executionId = $"{_settings.DataProject}-{DateTime.Now:yyyy-MM-dd_HH-mm-ss}-{Guid.NewGuid()}";
|
||||
|
||||
var responseExportToPackage = await _httpClientHelper.ExportToPackage(_settings.DataProject, executionId, executionId, _settings.Company);
|
||||
|
||||
if (!responseExportToPackage.IsSuccessStatusCode)
|
||||
throw new Exception(string.Format(Resources.Job_0_Download_failure_1, _context.JobDetail.Key, responseExportToPackage.StatusCode));
|
||||
{
|
||||
throw new JobExecutionException($@"Job: {_settings.JobKey}. ExportToPackage request failed.");
|
||||
}
|
||||
|
||||
string executionStatus;
|
||||
var attempt = 0;
|
||||
|
@ -165,12 +145,20 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
}
|
||||
attempt++;
|
||||
|
||||
executionStatus = await _httpClientHelper.GetExecutionSummaryStatus(executionId);
|
||||
if (Log.IsDebugEnabled)
|
||||
Log.Debug(string.Format(Resources.Job_0_Checking_if_export_is_completed_Try_1_Status_2, _context.JobDetail.Key, attempt, executionStatus));
|
||||
if (attempt == 1000)//TODO hardcoded
|
||||
var responseGetExecutionSummaryStatus = await _httpClientHelper.GetExecutionSummaryStatus(executionId);
|
||||
if (!responseGetExecutionSummaryStatus.IsSuccessStatusCode)
|
||||
{
|
||||
throw new Exception(string.Format(Resources.Job_0_Checking_for_status_reached_1_attempts_Status_is_2_Exiting, _context.JobDetail.Key, attempt, executionStatus));
|
||||
throw new JobExecutionException($@"Job: {_settings.JobKey}. GetExecutionSummaryStatus request failed.");
|
||||
}
|
||||
executionStatus = HttpClientHelper.ReadResponseString(responseGetExecutionSummaryStatus);
|
||||
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug(string.Format(Resources.Job_0_Checking_if_export_is_completed_Try_1_Status_2, _context.JobDetail.Key, attempt, executionStatus));
|
||||
}
|
||||
if (attempt == 100)//TODO hardcoded
|
||||
{
|
||||
throw new JobExecutionException(string.Format(Resources.Job_0_Checking_for_status_reached_1_attempts_Status_is_2_Exiting, _context.JobDetail.Key, attempt, executionStatus));
|
||||
}
|
||||
}
|
||||
while (executionStatus == "NotRun" || executionStatus == "Executing" || executionStatus == "Bad request");
|
||||
|
@ -178,7 +166,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
if (executionStatus == "Succeeded" || executionStatus == "PartiallySucceeded")
|
||||
{
|
||||
attempt = 0;//Reset for get url request attempts
|
||||
Uri packageUrl = null;
|
||||
HttpResponseMessage packageUrlResponse;
|
||||
do
|
||||
{
|
||||
if (attempt > 0 && _settings.DelayBetweenFiles > 0) //Only delay after first file and never after last.
|
||||
|
@ -187,33 +175,43 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
}
|
||||
attempt++;
|
||||
|
||||
packageUrl = await _httpClientHelper.GetExportedPackageUrl(executionId);
|
||||
if (Log.IsDebugEnabled)
|
||||
packageUrlResponse = await _httpClientHelper.GetExportedPackageUrl(executionId);
|
||||
if (!packageUrlResponse.IsSuccessStatusCode)
|
||||
{
|
||||
throw new JobExecutionException($"Job: {_context.JobDetail.Key}. GetExportedPackageUrl request failed.");
|
||||
}
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.Debug(string.Format(Resources.Job_0_Trying_to_get_exported_package_URL_Try_1, _context.JobDetail.Key, attempt));
|
||||
}
|
||||
if (attempt == 100)//TODO hardcoded
|
||||
{
|
||||
throw new Exception(string.Format(Resources.Job_0_Request_to_download_exported_package_reached_1_attempts_Exiting, _context.JobDetail.Key, attempt));
|
||||
throw new JobExecutionException(string.Format(Resources.Job_0_Request_to_download_exported_package_reached_1_attempts_Exiting, _context.JobDetail.Key, attempt));
|
||||
}
|
||||
}
|
||||
while (packageUrl == null);
|
||||
while (string.IsNullOrEmpty(HttpClientHelper.ReadResponseString(packageUrlResponse)));
|
||||
|
||||
var response = await _httpClientHelper.GetRequestAsync(new UriBuilder(packageUrl).Uri, false);
|
||||
var packageUri = new Uri(HttpClientHelper.ReadResponseString(packageUrlResponse));
|
||||
var response = await _httpClientHelper.GetRequestAsync(packageUri, false);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
throw new JobExecutionException(string.Format(Resources.Job_0_Download_failure_1, _context.JobDetail.Key, string.Format($"Status: {response.StatusCode}. Message: {response.Content}")));
|
||||
|
||||
}
|
||||
using Stream downloadedStream = await response.Content.ReadAsStreamAsync();
|
||||
|
||||
var fileName = $"{DateTime.Now:yyyy-MM-dd_HH-mm-ss-ffff}.zip";
|
||||
var successPath = Path.Combine(_settings.DownloadSuccessDir, fileName);
|
||||
var dataMessage = new DataMessage()
|
||||
{
|
||||
FullPath = successPath,
|
||||
FullPath = Path.Combine(_settings.DownloadSuccessDir, fileName),
|
||||
Name = fileName,
|
||||
MessageStatus = MessageStatus.Succeeded
|
||||
};
|
||||
_retryPolicyForIo.Execute(() => FileOperationsHelper.Create(downloadedStream, dataMessage.FullPath));
|
||||
|
||||
if (_settings.UnzipPackage)
|
||||
{
|
||||
_retryPolicyForIo.Execute(() => FileOperationsHelper.UnzipPackage(dataMessage.FullPath, _settings.DeletePackage, _settings.AddTimestamp));
|
||||
}
|
||||
}
|
||||
else if (executionStatus == "Unknown" || executionStatus == "Failed" || executionStatus == "Canceled")
|
||||
{
|
||||
|
@ -225,10 +223,5 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string CreateExecutionId(string dataProject)
|
||||
{
|
||||
return $"{dataProject}-{DateTime.Now:yyyy-MM-dd_HH-mm-ss}-{Guid.NewGuid().ToString()}";
|
||||
}
|
||||
}
|
||||
}
|
|
@ -106,7 +106,7 @@ namespace RecurringIntegrationsScheduler.Job.Properties {
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Job: {0}. Download failure. {1}.
|
||||
/// Looks up a localized string similar to Job: {0}. Download failure. Response message: {1}.
|
||||
/// </summary>
|
||||
internal static string Job_0_Download_failure_1 {
|
||||
get {
|
||||
|
@ -132,6 +132,15 @@ namespace RecurringIntegrationsScheduler.Job.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to jon: {0} ExportToPackage request failed. Details below.{1}.
|
||||
/// </summary>
|
||||
internal static string Job_0_ExportToPackage_request_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("Job_0_ExportToPackage_request_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Job: {0} failed.
|
||||
/// </summary>
|
||||
|
|
|
@ -136,7 +136,7 @@
|
|||
<value>Job: {0}. File: {1} was downloaded.</value>
|
||||
</data>
|
||||
<data name="Job_0_Download_failure_1" xml:space="preserve">
|
||||
<value>Job: {0}. Download failure. {1}</value>
|
||||
<value>Job: {0}. Download failure. Response message: {1}</value>
|
||||
</data>
|
||||
<data name="Job_0_Dequeued_1_file" xml:space="preserve">
|
||||
<value>Job: {0}. Dequeued {1} file(s).</value>
|
||||
|
@ -192,4 +192,7 @@
|
|||
<data name="Job_0_Request_to_download_exported_package_reached_1_attempts_Exiting" xml:space="preserve">
|
||||
<value>Job: {0}. Request to download exported package reached {1} attempts. Exiting...</value>
|
||||
</data>
|
||||
<data name="Job_0_ExportToPackage_request_failed" xml:space="preserve">
|
||||
<value>jon: {0} ExportToPackage request failed. Details below.{1}</value>
|
||||
</data>
|
||||
</root>
|
|
@ -15,7 +15,6 @@ using System.Collections.Concurrent;
|
|||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
|
||||
|
@ -61,11 +60,6 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// </summary>
|
||||
private Policy _retryPolicyForIo;
|
||||
|
||||
/// <summary>
|
||||
/// Retry policy for HTTP operations
|
||||
/// </summary>
|
||||
private Polly.Retry.AsyncRetryPolicy _retryPolicyForHttp;
|
||||
|
||||
/// <summary>
|
||||
/// Called by the <see cref="T:Quartz.IScheduler" /> when a <see cref="T:Quartz.ITrigger" />
|
||||
/// fires that is associated with the <see cref="T:Quartz.IJob" />.
|
||||
|
@ -103,54 +97,37 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_IO_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
_retryPolicyForHttp = Policy.Handle<HttpRequestException>().WaitAndRetryAsync(
|
||||
retryCount: _settings.RetryCount,
|
||||
sleepDurationProvider: attempt => TimeSpan.FromSeconds(_settings.RetryDelay),
|
||||
onRetry: (exception, calculatedWaitDuration) =>
|
||||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_Http_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_starting, _context.JobDetail.Key));
|
||||
|
||||
}
|
||||
await Process();
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_ended, _context.JobDetail.Key));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_settings.PauseJobOnException)
|
||||
{
|
||||
await context.Scheduler.PauseJob(context.JobDetail.Key);
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture,
|
||||
string.Format(Resources.Job_0_was_paused_because_of_error, _context.JobDetail.Key));
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_was_paused_because_of_error, _context.JobDetail.Key));
|
||||
}
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.Message))
|
||||
{
|
||||
Log.Error(ex.Message, ex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error("Unknown exception", ex);
|
||||
}
|
||||
|
||||
while (ex.InnerException != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.InnerException.Message))
|
||||
Log.Error(ex.InnerException.Message, ex.InnerException);
|
||||
|
||||
ex = ex.InnerException;
|
||||
}
|
||||
}
|
||||
if (context.Scheduler.SchedulerName != "Private")
|
||||
{
|
||||
throw new JobExecutionException(string.Format(Resources.Import_job_0_failed, _context.JobDetail.Key), ex, false);
|
||||
|
||||
if (!Log.IsDebugEnabled)
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -165,8 +142,10 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
foreach (
|
||||
var dataMessage in FileOperationsHelper.GetFiles(MessageStatus.Input, _settings.InputDir, _settings.SearchPattern, SearchOption.AllDirectories, _settings.OrderBy, _settings.ReverseOrder))
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_File_1_found_in_input_location, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}")));
|
||||
}
|
||||
InputQueue.Enqueue(dataMessage);
|
||||
}
|
||||
|
||||
|
@ -185,7 +164,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// </returns>
|
||||
private async Task ProcessInputQueue()
|
||||
{
|
||||
using (_httpClientHelper = new HttpClientHelper(_settings, _retryPolicyForHttp))
|
||||
using (_httpClientHelper = new HttpClientHelper(_settings))
|
||||
{
|
||||
var fileCount = 0;
|
||||
string fileNameInPackageTemplate = "";
|
||||
|
@ -197,7 +176,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
fileNameInPackageTemplate = GetFileNameInPackageTemplate();
|
||||
if (string.IsNullOrEmpty(fileNameInPackageTemplate))
|
||||
{
|
||||
throw new Exception(string.Format(Resources.Job_0_Please_check_your_package_template_Input_file_name_in_Manifest_cannot_be_identified, _context.JobDetail.Key));
|
||||
throw new JobExecutionException(string.Format(Resources.Job_0_Please_check_your_package_template_Input_file_name_in_Manifest_cannot_be_identified, _context.JobDetail.Key));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -251,12 +230,11 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
|
||||
// Get blob url and id. Returns in json format
|
||||
var response = await _httpClientHelper.GetAzureWriteUrl();
|
||||
if(string.IsNullOrEmpty(response))
|
||||
if(!response.IsSuccessStatusCode)
|
||||
{
|
||||
Log.ErrorFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Method_GetAzureWriteUrl_returned_empty_string, _context.JobDetail.Key));
|
||||
continue;
|
||||
throw new JobExecutionException($"Job: {_settings.JobKey}. Request GetAzureWriteUrl failed.");
|
||||
}
|
||||
var blobInfo = (JObject)JsonConvert.DeserializeObject(response);
|
||||
var blobInfo = (JObject)JsonConvert.DeserializeObject(HttpClientHelper.ReadResponseString(response));
|
||||
var blobUrl = blobInfo["BlobUrl"].ToString();
|
||||
|
||||
var blobUri = new Uri(blobUrl);
|
||||
|
@ -277,11 +255,11 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
{
|
||||
//Now send import request
|
||||
var targetLegalEntity = _settings.Company;
|
||||
if (_settings.GetLegalEntityFromSubfolder)
|
||||
if (_settings.MultiCompanyImport && _settings.GetLegalEntityFromSubfolder)
|
||||
{
|
||||
targetLegalEntity = new FileInfo(dataMessage.FullPath).Directory.Name;
|
||||
}
|
||||
if (_settings.GetLegalEntityFromFilename)
|
||||
if (_settings.MultiCompanyImport && _settings.GetLegalEntityFromFilename)
|
||||
{
|
||||
String[] separator = { _settings.FilenameSeparator };
|
||||
var tokenList = dataMessage.Name.Split(separator, 10, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
@ -293,7 +271,6 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
Log.ErrorFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Target_legal_entity_is_not_valid_1, _context.JobDetail.Key, targetLegalEntity));
|
||||
}
|
||||
|
||||
|
||||
if(string.IsNullOrEmpty(targetLegalEntity))
|
||||
{
|
||||
throw new Exception(string.Format(Resources.Job_0_Unable_to_get_target_legal_entity_name, _context.JobDetail.Key));
|
||||
|
@ -325,7 +302,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
else
|
||||
{
|
||||
// import request failed. Move message to error location.
|
||||
Log.ErrorFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Upload_failed_for_file_1_Failure_response_Status_2_Reason_3, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}"), importResponse.StatusCode, importResponse.ReasonPhrase, $"{Environment.NewLine}packageUrl: {blobUri.AbsoluteUri}{Environment.NewLine}definitionGroupId: {_settings.DataProject}{Environment.NewLine}executionId: {executionIdGenerated}{Environment.NewLine}execute: {_settings.ExecuteImport.ToString()}{Environment.NewLine}overwrite: {_settings.OverwriteDataProject.ToString()}{Environment.NewLine}legalEntityId: {targetLegalEntity}"));
|
||||
Log.ErrorFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Upload_failed_for_file_1_Failure_response_Status_2_Reason_3, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}"), importResponse.StatusCode, importResponse.ReasonPhrase, $"{Environment.NewLine}packageUrl: {blobUri.AbsoluteUri}{Environment.NewLine}definitionGroupId: {_settings.DataProject}{Environment.NewLine}executionId: {executionIdGenerated}{Environment.NewLine}execute: {_settings.ExecuteImport}{Environment.NewLine}overwrite: {_settings.OverwriteDataProject}{Environment.NewLine}legalEntityId: {targetLegalEntity}"));
|
||||
|
||||
var targetDataMessage = new DataMessage(dataMessage)
|
||||
{
|
||||
|
@ -462,7 +439,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
|
||||
private static string CreateExecutionId(string dataProject)
|
||||
{
|
||||
return $"{dataProject}-{DateTime.Now:yyyy-MM-dd_HH-mm-ss}-{Guid.NewGuid().ToString()}";
|
||||
return $"{dataProject}-{DateTime.Now:yyyy-MM-dd_HH-mm-ss}-{Guid.NewGuid()}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,6 @@ using System;
|
|||
using System.Collections.Concurrent;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RecurringIntegrationsScheduler.Job
|
||||
|
@ -59,11 +58,6 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// </summary>
|
||||
private Policy _retryPolicyForIo;
|
||||
|
||||
/// <summary>
|
||||
/// Retry policy for HTTP operations
|
||||
/// </summary>
|
||||
private Polly.Retry.AsyncRetryPolicy _retryPolicyForHttp;
|
||||
|
||||
/// <summary>
|
||||
/// Called by the <see cref="T:Quartz.IScheduler" /> when a <see cref="T:Quartz.ITrigger" />
|
||||
/// fires that is associated with the <see cref="T:Quartz.IJob" />.
|
||||
|
@ -101,54 +95,37 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_IO_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
_retryPolicyForHttp = Policy.Handle<HttpRequestException>().WaitAndRetryAsync(
|
||||
retryCount: _settings.RetryCount,
|
||||
sleepDurationProvider: attempt => TimeSpan.FromSeconds(_settings.RetryDelay),
|
||||
onRetry: (exception, calculatedWaitDuration) =>
|
||||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_Http_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_starting, _context.JobDetail.Key));
|
||||
|
||||
}
|
||||
await Process();
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_ended, _context.JobDetail.Key));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (_settings.PauseJobOnException)
|
||||
{
|
||||
await context.Scheduler.PauseJob(context.JobDetail.Key);
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture,
|
||||
string.Format(Resources.Job_0_was_paused_because_of_error, _context.JobDetail.Key));
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_was_paused_because_of_error, _context.JobDetail.Key));
|
||||
}
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.Message))
|
||||
{
|
||||
Log.Error(ex.Message, ex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error("Unknown exception", ex);
|
||||
}
|
||||
|
||||
while (ex.InnerException != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.InnerException.Message))
|
||||
Log.Error(ex.InnerException.Message, ex.InnerException);
|
||||
|
||||
ex = ex.InnerException;
|
||||
}
|
||||
}
|
||||
if (context.Scheduler.SchedulerName != "Private")
|
||||
{
|
||||
throw new JobExecutionException(string.Format(Resources.Processing_monitor_job_0_failed, _context.JobDetail.Key), ex, false);
|
||||
|
||||
if (!Log.IsDebugEnabled)
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,13 +138,17 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
EnqueuedJobs = new ConcurrentQueue<DataMessage>();
|
||||
foreach (var dataMessage in FileOperationsHelper.GetStatusFiles(MessageStatus.InProcess, _settings.UploadSuccessDir, "*" + _settings.StatusFileExtension))
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_File_1_found_in_processing_location_and_added_to_queue_for_status_check, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}")));
|
||||
}
|
||||
EnqueuedJobs.Enqueue(dataMessage);
|
||||
}
|
||||
|
||||
if (!EnqueuedJobs.IsEmpty)
|
||||
{
|
||||
await ProcessEnqueuedQueue();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -177,7 +158,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
private async Task ProcessEnqueuedQueue()
|
||||
{
|
||||
var fileCount = 0;
|
||||
_httpClientHelper = new HttpClientHelper(_settings, _retryPolicyForHttp);
|
||||
_httpClientHelper = new HttpClientHelper(_settings);
|
||||
|
||||
while (EnqueuedJobs.TryDequeue(out DataMessage dataMessage))
|
||||
{
|
||||
|
@ -192,7 +173,9 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
|
||||
// If status was found and is not null,
|
||||
if (jobStatusDetail != null)
|
||||
{
|
||||
await PostProcessMessage(jobStatusDetail, dataMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,8 +188,9 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
private async Task PostProcessMessage(DataJobStatusDetail jobStatusDetail, DataMessage dataMessage)
|
||||
{
|
||||
if (jobStatusDetail?.DataJobStatus == null)
|
||||
{
|
||||
return;
|
||||
|
||||
}
|
||||
dataMessage.DataJobState = jobStatusDetail.DataJobStatus.DataJobState;
|
||||
|
||||
_retryPolicyForIo.Execute(() => FileOperationsHelper.WriteStatusFile(dataMessage, _settings.StatusFileExtension));
|
||||
|
@ -234,14 +218,15 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
|
||||
if (_settings.GetExecutionErrors)
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Trying_to_download_execution_errors, _context.JobDetail.Key));
|
||||
}
|
||||
var response = await _httpClientHelper.GetExecutionErrors(dataMessage.MessageId);
|
||||
if (!response.IsSuccessStatusCode)
|
||||
{
|
||||
throw new JobExecutionException(string.Format(Resources.Job_0_download_of_execution_errors_failed_1, _context.JobDetail.Key, string.Format($"Status: {response.StatusCode}. Message: {response.Content}")));
|
||||
|
||||
}
|
||||
using Stream downloadedStream = await response.Content.ReadAsStreamAsync();
|
||||
var errorsFileName = $"{Path.GetFileNameWithoutExtension(dataMessage.Name)}-ExecutionErrors-{DateTime.Now:yyyy-MM-dd_HH-mm-ss-ffff}.txt";
|
||||
var errorsFilePath = Path.Combine(Path.GetDirectoryName(dataMessage.FullPath.Replace(_settings.UploadSuccessDir, _settings.ProcessingErrorsDir)), errorsFileName);
|
||||
|
|
|
@ -12,7 +12,6 @@ using System;
|
|||
using System.Collections.Concurrent;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace RecurringIntegrationsScheduler.Job
|
||||
|
@ -57,11 +56,6 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// </summary>
|
||||
private Policy _retryPolicyForIo;
|
||||
|
||||
/// <summary>
|
||||
/// Retry policy for HTTP operations
|
||||
/// </summary>
|
||||
private Polly.Retry.AsyncRetryPolicy _retryPolicyForHttp;
|
||||
|
||||
/// <summary>
|
||||
/// Called by the <see cref="T:Quartz.IScheduler" /> when a <see cref="T:Quartz.ITrigger" />
|
||||
/// fires that is associated with the <see cref="T:Quartz.IJob" />.
|
||||
|
@ -99,21 +93,17 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_IO_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
_retryPolicyForHttp = Policy.Handle<HttpRequestException>().WaitAndRetryAsync(
|
||||
retryCount: _settings.RetryCount,
|
||||
sleepDurationProvider: attempt => TimeSpan.FromSeconds(_settings.RetryDelay),
|
||||
onRetry: (exception, calculatedWaitDuration) =>
|
||||
{
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Retrying_Http_operation_Exception_1, _context.JobDetail.Key, exception.Message));
|
||||
});
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_starting, _context.JobDetail.Key));
|
||||
|
||||
}
|
||||
await Process();
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_ended, _context.JobDetail.Key));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -123,30 +113,18 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
Log.WarnFormat(CultureInfo.InvariantCulture,
|
||||
string.Format(Resources.Job_0_was_paused_because_of_error, _context.JobDetail.Key));
|
||||
}
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.Message))
|
||||
{
|
||||
Log.Error(ex.Message, ex);
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Error("Unknown exception", ex);
|
||||
}
|
||||
|
||||
while (ex.InnerException != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(ex.InnerException.Message))
|
||||
Log.Error(ex.InnerException.Message, ex.InnerException);
|
||||
|
||||
ex = ex.InnerException;
|
||||
}
|
||||
}
|
||||
if (context.Scheduler.SchedulerName != "Private")
|
||||
{
|
||||
throw new JobExecutionException(string.Format(Resources.Upload_job_0_failed, _context.JobDetail.Key), ex, false);
|
||||
|
||||
if (!Log.IsDebugEnabled)
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
Log.Error(string.Format(Resources.Job_0_thrown_an_error_1, _context.JobDetail.Key, ex.Message));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,8 +138,11 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
|
||||
foreach (var dataMessage in FileOperationsHelper.GetFiles(MessageStatus.Input, _settings.InputDir, _settings.SearchPattern, SearchOption.AllDirectories, _settings.OrderBy, _settings.ReverseOrder))
|
||||
{
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_File_1_found_in_input_location, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}")));
|
||||
|
||||
}
|
||||
InputQueue.Enqueue(dataMessage);
|
||||
}
|
||||
|
||||
|
@ -180,7 +161,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
/// </returns>
|
||||
private async Task ProcessInputQueue()
|
||||
{
|
||||
using (_httpClientHelper = new HttpClientHelper(_settings, _retryPolicyForHttp))
|
||||
using (_httpClientHelper = new HttpClientHelper(_settings))
|
||||
{
|
||||
var fileCount = 0;
|
||||
|
||||
|
@ -199,9 +180,10 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
|
||||
sourceStream.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Uploading_file_1_File_size_2_bytes, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}"), sourceStream.Length));
|
||||
|
||||
}
|
||||
// Post enqueue file request
|
||||
var response = await _httpClientHelper.PostStreamRequestAsync(_httpClientHelper.GetEnqueueUri(), sourceStream, dataMessage.Name);
|
||||
sourceStream.Close();
|
||||
|
@ -223,8 +205,10 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
if (_settings.ProcessingJobPresent)
|
||||
_retryPolicyForIo.Execute(() => FileOperationsHelper.WriteStatusFile(targetDataMessage, _settings.StatusFileExtension));
|
||||
|
||||
if (Log.IsDebugEnabled)
|
||||
if (_settings.LogVerbose || Log.IsDebugEnabled)
|
||||
{
|
||||
Log.DebugFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_File_1_uploaded_successfully_Message_Id_2, _context.JobDetail.Key, dataMessage.FullPath.Replace(@"{", @"{{").Replace(@"}", @"}}"), targetDataMessage.MessageId));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -104,6 +104,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.mainToolStrip = new System.Windows.Forms.ToolStrip();
|
||||
this.cancelToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.addToolStripButton = new System.Windows.Forms.ToolStripButton();
|
||||
this.groupBoxLogging = new System.Windows.Forms.GroupBox();
|
||||
this.verboseLoggingCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.jobIdentificationGroupBox.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.delayBetweenFilesNumericUpDown)).BeginInit();
|
||||
this.axDetailsGroupBox.SuspendLayout();
|
||||
|
@ -124,6 +126,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.simpleTriggerJobGroupBox.SuspendLayout();
|
||||
this.connectionTabPage.SuspendLayout();
|
||||
this.mainToolStrip.SuspendLayout();
|
||||
this.groupBoxLogging.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// jobIdentificationGroupBox
|
||||
|
@ -134,9 +137,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.jobIdentificationGroupBox.Controls.Add(this.jobGroupComboBox);
|
||||
this.jobIdentificationGroupBox.Controls.Add(this.jobDescriptionLabel);
|
||||
this.jobIdentificationGroupBox.Controls.Add(this.jobDescription);
|
||||
this.jobIdentificationGroupBox.Location = new System.Drawing.Point(4, 4);
|
||||
this.jobIdentificationGroupBox.Location = new System.Drawing.Point(7, 7);
|
||||
this.jobIdentificationGroupBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobIdentificationGroupBox.Name = "jobIdentificationGroupBox";
|
||||
this.jobIdentificationGroupBox.Size = new System.Drawing.Size(214, 203);
|
||||
this.jobIdentificationGroupBox.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobIdentificationGroupBox.Size = new System.Drawing.Size(392, 375);
|
||||
this.jobIdentificationGroupBox.TabIndex = 0;
|
||||
this.jobIdentificationGroupBox.TabStop = false;
|
||||
this.jobIdentificationGroupBox.Text = "Job identification";
|
||||
|
@ -144,25 +149,28 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// jobNameLabel
|
||||
//
|
||||
this.jobNameLabel.AutoSize = true;
|
||||
this.jobNameLabel.Location = new System.Drawing.Point(4, 34);
|
||||
this.jobNameLabel.Location = new System.Drawing.Point(7, 63);
|
||||
this.jobNameLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.jobNameLabel.Name = "jobNameLabel";
|
||||
this.jobNameLabel.Size = new System.Drawing.Size(71, 13);
|
||||
this.jobNameLabel.Size = new System.Drawing.Size(129, 25);
|
||||
this.jobNameLabel.TabIndex = 0;
|
||||
this.jobNameLabel.Text = "RIS job name";
|
||||
//
|
||||
// jobName
|
||||
//
|
||||
this.jobName.Location = new System.Drawing.Point(81, 31);
|
||||
this.jobName.Location = new System.Drawing.Point(149, 57);
|
||||
this.jobName.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobName.Name = "jobName";
|
||||
this.jobName.Size = new System.Drawing.Size(130, 20);
|
||||
this.jobName.Size = new System.Drawing.Size(235, 29);
|
||||
this.jobName.TabIndex = 1;
|
||||
//
|
||||
// jobGroupLabel
|
||||
//
|
||||
this.jobGroupLabel.AutoSize = true;
|
||||
this.jobGroupLabel.Location = new System.Drawing.Point(4, 60);
|
||||
this.jobGroupLabel.Location = new System.Drawing.Point(7, 111);
|
||||
this.jobGroupLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.jobGroupLabel.Name = "jobGroupLabel";
|
||||
this.jobGroupLabel.Size = new System.Drawing.Size(72, 13);
|
||||
this.jobGroupLabel.Size = new System.Drawing.Size(130, 25);
|
||||
this.jobGroupLabel.TabIndex = 2;
|
||||
this.jobGroupLabel.Text = "RIS job group";
|
||||
//
|
||||
|
@ -170,27 +178,30 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.jobGroupComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.jobGroupComboBox.FormattingEnabled = true;
|
||||
this.jobGroupComboBox.Location = new System.Drawing.Point(81, 57);
|
||||
this.jobGroupComboBox.Location = new System.Drawing.Point(149, 105);
|
||||
this.jobGroupComboBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobGroupComboBox.Name = "jobGroupComboBox";
|
||||
this.jobGroupComboBox.Size = new System.Drawing.Size(130, 21);
|
||||
this.jobGroupComboBox.Size = new System.Drawing.Size(235, 32);
|
||||
this.jobGroupComboBox.Sorted = true;
|
||||
this.jobGroupComboBox.TabIndex = 2;
|
||||
//
|
||||
// jobDescriptionLabel
|
||||
//
|
||||
this.jobDescriptionLabel.AutoSize = true;
|
||||
this.jobDescriptionLabel.Location = new System.Drawing.Point(4, 90);
|
||||
this.jobDescriptionLabel.Location = new System.Drawing.Point(7, 166);
|
||||
this.jobDescriptionLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.jobDescriptionLabel.Name = "jobDescriptionLabel";
|
||||
this.jobDescriptionLabel.Size = new System.Drawing.Size(124, 13);
|
||||
this.jobDescriptionLabel.Size = new System.Drawing.Size(231, 25);
|
||||
this.jobDescriptionLabel.TabIndex = 4;
|
||||
this.jobDescriptionLabel.Text = "Job description (optional)";
|
||||
//
|
||||
// jobDescription
|
||||
//
|
||||
this.jobDescription.Location = new System.Drawing.Point(7, 107);
|
||||
this.jobDescription.Location = new System.Drawing.Point(13, 198);
|
||||
this.jobDescription.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobDescription.Multiline = true;
|
||||
this.jobDescription.Name = "jobDescription";
|
||||
this.jobDescription.Size = new System.Drawing.Size(204, 89);
|
||||
this.jobDescription.Size = new System.Drawing.Size(371, 161);
|
||||
this.jobDescription.TabIndex = 3;
|
||||
//
|
||||
// useStandardSubfolder
|
||||
|
@ -198,9 +209,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.useStandardSubfolder.AutoSize = true;
|
||||
this.useStandardSubfolder.Checked = true;
|
||||
this.useStandardSubfolder.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.useStandardSubfolder.Location = new System.Drawing.Point(5, 74);
|
||||
this.useStandardSubfolder.Location = new System.Drawing.Point(9, 137);
|
||||
this.useStandardSubfolder.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.useStandardSubfolder.Name = "useStandardSubfolder";
|
||||
this.useStandardSubfolder.Size = new System.Drawing.Size(143, 17);
|
||||
this.useStandardSubfolder.Size = new System.Drawing.Size(253, 29);
|
||||
this.useStandardSubfolder.TabIndex = 8;
|
||||
this.useStandardSubfolder.Text = global::RecurringIntegrationsScheduler.Properties.Resources.Use_default_folder_names;
|
||||
this.useStandardSubfolder.UseVisualStyleBackColor = true;
|
||||
|
@ -211,10 +223,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.errorsFolderBrowserButton.Enabled = false;
|
||||
this.errorsFolderBrowserButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.errorsFolderBrowserButton.Image = global::RecurringIntegrationsScheduler.Properties.Resources.Folder_open_32xMD_exp;
|
||||
this.errorsFolderBrowserButton.Location = new System.Drawing.Point(195, 109);
|
||||
this.errorsFolderBrowserButton.Location = new System.Drawing.Point(358, 201);
|
||||
this.errorsFolderBrowserButton.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.errorsFolderBrowserButton.Name = "errorsFolderBrowserButton";
|
||||
this.errorsFolderBrowserButton.Size = new System.Drawing.Size(24, 26);
|
||||
this.errorsFolderBrowserButton.Size = new System.Drawing.Size(44, 48);
|
||||
this.errorsFolderBrowserButton.TabIndex = 7;
|
||||
this.errorsFolderBrowserButton.TextAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.errorsFolderBrowserButton.UseVisualStyleBackColor = true;
|
||||
|
@ -223,17 +235,19 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// errorsFolder
|
||||
//
|
||||
this.errorsFolder.Enabled = false;
|
||||
this.errorsFolder.Location = new System.Drawing.Point(5, 113);
|
||||
this.errorsFolder.Location = new System.Drawing.Point(9, 209);
|
||||
this.errorsFolder.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.errorsFolder.Name = "errorsFolder";
|
||||
this.errorsFolder.Size = new System.Drawing.Size(187, 20);
|
||||
this.errorsFolder.Size = new System.Drawing.Size(340, 29);
|
||||
this.errorsFolder.TabIndex = 6;
|
||||
//
|
||||
// errorsFolderLabel
|
||||
//
|
||||
this.errorsFolderLabel.AutoSize = true;
|
||||
this.errorsFolderLabel.Location = new System.Drawing.Point(3, 95);
|
||||
this.errorsFolderLabel.Location = new System.Drawing.Point(6, 175);
|
||||
this.errorsFolderLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.errorsFolderLabel.Name = "errorsFolderLabel";
|
||||
this.errorsFolderLabel.Size = new System.Drawing.Size(63, 13);
|
||||
this.errorsFolderLabel.Size = new System.Drawing.Size(117, 25);
|
||||
this.errorsFolderLabel.TabIndex = 11;
|
||||
this.errorsFolderLabel.Text = "Errors folder";
|
||||
//
|
||||
|
@ -241,10 +255,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.downloadFolderBrowserButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238)));
|
||||
this.downloadFolderBrowserButton.Image = global::RecurringIntegrationsScheduler.Properties.Resources.Folder_open_32xMD_exp;
|
||||
this.downloadFolderBrowserButton.Location = new System.Drawing.Point(195, 49);
|
||||
this.downloadFolderBrowserButton.Location = new System.Drawing.Point(358, 90);
|
||||
this.downloadFolderBrowserButton.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.downloadFolderBrowserButton.Name = "downloadFolderBrowserButton";
|
||||
this.downloadFolderBrowserButton.Size = new System.Drawing.Size(24, 26);
|
||||
this.downloadFolderBrowserButton.Size = new System.Drawing.Size(44, 48);
|
||||
this.downloadFolderBrowserButton.TabIndex = 5;
|
||||
this.downloadFolderBrowserButton.TextAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||
this.downloadFolderBrowserButton.UseVisualStyleBackColor = true;
|
||||
|
@ -252,40 +266,43 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
// downloadFolder
|
||||
//
|
||||
this.downloadFolder.Location = new System.Drawing.Point(5, 52);
|
||||
this.downloadFolder.Location = new System.Drawing.Point(9, 96);
|
||||
this.downloadFolder.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.downloadFolder.Name = "downloadFolder";
|
||||
this.downloadFolder.Size = new System.Drawing.Size(187, 20);
|
||||
this.downloadFolder.Size = new System.Drawing.Size(340, 29);
|
||||
this.downloadFolder.TabIndex = 4;
|
||||
this.downloadFolder.TextChanged += new System.EventHandler(this.DownloadFolder_TextChanged);
|
||||
//
|
||||
// downloadFolderLabel
|
||||
//
|
||||
this.downloadFolderLabel.AutoSize = true;
|
||||
this.downloadFolderLabel.Location = new System.Drawing.Point(3, 34);
|
||||
this.downloadFolderLabel.Location = new System.Drawing.Point(6, 63);
|
||||
this.downloadFolderLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.downloadFolderLabel.Name = "downloadFolderLabel";
|
||||
this.downloadFolderLabel.Size = new System.Drawing.Size(84, 13);
|
||||
this.downloadFolderLabel.Size = new System.Drawing.Size(152, 25);
|
||||
this.downloadFolderLabel.TabIndex = 8;
|
||||
this.downloadFolderLabel.Text = "Download folder";
|
||||
//
|
||||
// delayBetweenFilesLabel
|
||||
//
|
||||
this.delayBetweenFilesLabel.Location = new System.Drawing.Point(6, 139);
|
||||
this.delayBetweenFilesLabel.Location = new System.Drawing.Point(11, 257);
|
||||
this.delayBetweenFilesLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.delayBetweenFilesLabel.Name = "delayBetweenFilesLabel";
|
||||
this.delayBetweenFilesLabel.Size = new System.Drawing.Size(149, 42);
|
||||
this.delayBetweenFilesLabel.Size = new System.Drawing.Size(273, 78);
|
||||
this.delayBetweenFilesLabel.TabIndex = 26;
|
||||
this.delayBetweenFilesLabel.Text = "Delay between attempts to download exported files from blob storage (seconds)";
|
||||
//
|
||||
// delayBetweenFilesNumericUpDown
|
||||
//
|
||||
this.delayBetweenFilesNumericUpDown.Location = new System.Drawing.Point(160, 150);
|
||||
this.delayBetweenFilesNumericUpDown.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.delayBetweenFilesNumericUpDown.Location = new System.Drawing.Point(293, 277);
|
||||
this.delayBetweenFilesNumericUpDown.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.delayBetweenFilesNumericUpDown.Maximum = new decimal(new int[] {
|
||||
3600,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.delayBetweenFilesNumericUpDown.Name = "delayBetweenFilesNumericUpDown";
|
||||
this.delayBetweenFilesNumericUpDown.Size = new System.Drawing.Size(61, 20);
|
||||
this.delayBetweenFilesNumericUpDown.Size = new System.Drawing.Size(112, 29);
|
||||
this.delayBetweenFilesNumericUpDown.TabIndex = 25;
|
||||
this.delayBetweenFilesNumericUpDown.Value = new decimal(new int[] {
|
||||
1,
|
||||
|
@ -297,10 +314,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.deletePackageCheckBox.AutoSize = true;
|
||||
this.deletePackageCheckBox.Enabled = false;
|
||||
this.deletePackageCheckBox.Location = new System.Drawing.Point(7, 111);
|
||||
this.deletePackageCheckBox.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.deletePackageCheckBox.Location = new System.Drawing.Point(13, 205);
|
||||
this.deletePackageCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.deletePackageCheckBox.Name = "deletePackageCheckBox";
|
||||
this.deletePackageCheckBox.Size = new System.Drawing.Size(118, 17);
|
||||
this.deletePackageCheckBox.Size = new System.Drawing.Size(203, 29);
|
||||
this.deletePackageCheckBox.TabIndex = 14;
|
||||
this.deletePackageCheckBox.Text = global::RecurringIntegrationsScheduler.Properties.Resources.Delete_package_file;
|
||||
this.deletePackageCheckBox.UseVisualStyleBackColor = true;
|
||||
|
@ -309,10 +326,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.addTimestampCheckBox.AutoSize = true;
|
||||
this.addTimestampCheckBox.Enabled = false;
|
||||
this.addTimestampCheckBox.Location = new System.Drawing.Point(7, 88);
|
||||
this.addTimestampCheckBox.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.addTimestampCheckBox.Location = new System.Drawing.Point(13, 162);
|
||||
this.addTimestampCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.addTimestampCheckBox.Name = "addTimestampCheckBox";
|
||||
this.addTimestampCheckBox.Size = new System.Drawing.Size(177, 17);
|
||||
this.addTimestampCheckBox.Size = new System.Drawing.Size(315, 29);
|
||||
this.addTimestampCheckBox.TabIndex = 13;
|
||||
this.addTimestampCheckBox.Text = global::RecurringIntegrationsScheduler.Properties.Resources.Make_exported_file_name_unique;
|
||||
this.addTimestampCheckBox.UseVisualStyleBackColor = true;
|
||||
|
@ -320,10 +337,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// unzipCheckBox
|
||||
//
|
||||
this.unzipCheckBox.AutoSize = true;
|
||||
this.unzipCheckBox.Location = new System.Drawing.Point(7, 65);
|
||||
this.unzipCheckBox.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.unzipCheckBox.Location = new System.Drawing.Point(13, 120);
|
||||
this.unzipCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.unzipCheckBox.Name = "unzipCheckBox";
|
||||
this.unzipCheckBox.Size = new System.Drawing.Size(114, 17);
|
||||
this.unzipCheckBox.Size = new System.Drawing.Size(197, 29);
|
||||
this.unzipCheckBox.TabIndex = 12;
|
||||
this.unzipCheckBox.Text = global::RecurringIntegrationsScheduler.Properties.Resources.Unzip_package_file;
|
||||
this.unzipCheckBox.UseVisualStyleBackColor = true;
|
||||
|
@ -338,9 +355,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.axDetailsGroupBox.Controls.Add(this.aadApplicationComboBox);
|
||||
this.axDetailsGroupBox.Controls.Add(this.userLabel);
|
||||
this.axDetailsGroupBox.Controls.Add(this.userComboBox);
|
||||
this.axDetailsGroupBox.Location = new System.Drawing.Point(8, 6);
|
||||
this.axDetailsGroupBox.Location = new System.Drawing.Point(15, 11);
|
||||
this.axDetailsGroupBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.axDetailsGroupBox.Name = "axDetailsGroupBox";
|
||||
this.axDetailsGroupBox.Size = new System.Drawing.Size(264, 131);
|
||||
this.axDetailsGroupBox.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.axDetailsGroupBox.Size = new System.Drawing.Size(484, 242);
|
||||
this.axDetailsGroupBox.TabIndex = 1;
|
||||
this.axDetailsGroupBox.TabStop = false;
|
||||
this.axDetailsGroupBox.Text = "Dynamics connection details";
|
||||
|
@ -348,9 +367,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// instanceLabel
|
||||
//
|
||||
this.instanceLabel.AutoSize = true;
|
||||
this.instanceLabel.Location = new System.Drawing.Point(7, 21);
|
||||
this.instanceLabel.Location = new System.Drawing.Point(13, 39);
|
||||
this.instanceLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.instanceLabel.Name = "instanceLabel";
|
||||
this.instanceLabel.Size = new System.Drawing.Size(48, 13);
|
||||
this.instanceLabel.Size = new System.Drawing.Size(86, 25);
|
||||
this.instanceLabel.TabIndex = 16;
|
||||
this.instanceLabel.Text = "Instance";
|
||||
//
|
||||
|
@ -358,27 +378,30 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.instanceComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.instanceComboBox.FormattingEnabled = true;
|
||||
this.instanceComboBox.Location = new System.Drawing.Point(59, 19);
|
||||
this.instanceComboBox.Location = new System.Drawing.Point(108, 35);
|
||||
this.instanceComboBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.instanceComboBox.Name = "instanceComboBox";
|
||||
this.instanceComboBox.Size = new System.Drawing.Size(201, 21);
|
||||
this.instanceComboBox.Size = new System.Drawing.Size(365, 32);
|
||||
this.instanceComboBox.TabIndex = 9;
|
||||
//
|
||||
// authMethodPanel
|
||||
//
|
||||
this.authMethodPanel.Controls.Add(this.userAuthRadioButton);
|
||||
this.authMethodPanel.Controls.Add(this.serviceAuthRadioButton);
|
||||
this.authMethodPanel.Location = new System.Drawing.Point(7, 45);
|
||||
this.authMethodPanel.Location = new System.Drawing.Point(13, 83);
|
||||
this.authMethodPanel.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.authMethodPanel.Name = "authMethodPanel";
|
||||
this.authMethodPanel.Size = new System.Drawing.Size(253, 25);
|
||||
this.authMethodPanel.Size = new System.Drawing.Size(464, 46);
|
||||
this.authMethodPanel.TabIndex = 31;
|
||||
//
|
||||
// userAuthRadioButton
|
||||
//
|
||||
this.userAuthRadioButton.AutoSize = true;
|
||||
this.userAuthRadioButton.Checked = true;
|
||||
this.userAuthRadioButton.Location = new System.Drawing.Point(3, 3);
|
||||
this.userAuthRadioButton.Location = new System.Drawing.Point(6, 6);
|
||||
this.userAuthRadioButton.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.userAuthRadioButton.Name = "userAuthRadioButton";
|
||||
this.userAuthRadioButton.Size = new System.Drawing.Size(117, 17);
|
||||
this.userAuthRadioButton.Size = new System.Drawing.Size(204, 29);
|
||||
this.userAuthRadioButton.TabIndex = 15;
|
||||
this.userAuthRadioButton.TabStop = true;
|
||||
this.userAuthRadioButton.Text = "User authentication";
|
||||
|
@ -387,9 +410,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// serviceAuthRadioButton
|
||||
//
|
||||
this.serviceAuthRadioButton.AutoSize = true;
|
||||
this.serviceAuthRadioButton.Location = new System.Drawing.Point(120, 3);
|
||||
this.serviceAuthRadioButton.Location = new System.Drawing.Point(220, 6);
|
||||
this.serviceAuthRadioButton.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.serviceAuthRadioButton.Name = "serviceAuthRadioButton";
|
||||
this.serviceAuthRadioButton.Size = new System.Drawing.Size(131, 17);
|
||||
this.serviceAuthRadioButton.Size = new System.Drawing.Size(229, 29);
|
||||
this.serviceAuthRadioButton.TabIndex = 16;
|
||||
this.serviceAuthRadioButton.Text = "Service authentication";
|
||||
this.serviceAuthRadioButton.UseVisualStyleBackColor = true;
|
||||
|
@ -398,9 +422,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// aadApplicationLabel
|
||||
//
|
||||
this.aadApplicationLabel.AutoSize = true;
|
||||
this.aadApplicationLabel.Location = new System.Drawing.Point(9, 79);
|
||||
this.aadApplicationLabel.Location = new System.Drawing.Point(17, 146);
|
||||
this.aadApplicationLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.aadApplicationLabel.Name = "aadApplicationLabel";
|
||||
this.aadApplicationLabel.Size = new System.Drawing.Size(109, 13);
|
||||
this.aadApplicationLabel.Size = new System.Drawing.Size(202, 25);
|
||||
this.aadApplicationLabel.TabIndex = 34;
|
||||
this.aadApplicationLabel.Text = "Azure app registration";
|
||||
//
|
||||
|
@ -408,17 +433,19 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.aadApplicationComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.aadApplicationComboBox.FormattingEnabled = true;
|
||||
this.aadApplicationComboBox.Location = new System.Drawing.Point(123, 76);
|
||||
this.aadApplicationComboBox.Location = new System.Drawing.Point(226, 140);
|
||||
this.aadApplicationComboBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.aadApplicationComboBox.Name = "aadApplicationComboBox";
|
||||
this.aadApplicationComboBox.Size = new System.Drawing.Size(137, 21);
|
||||
this.aadApplicationComboBox.Size = new System.Drawing.Size(248, 32);
|
||||
this.aadApplicationComboBox.TabIndex = 33;
|
||||
//
|
||||
// userLabel
|
||||
//
|
||||
this.userLabel.AutoSize = true;
|
||||
this.userLabel.Location = new System.Drawing.Point(90, 103);
|
||||
this.userLabel.Location = new System.Drawing.Point(165, 190);
|
||||
this.userLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.userLabel.Name = "userLabel";
|
||||
this.userLabel.Size = new System.Drawing.Size(29, 13);
|
||||
this.userLabel.Size = new System.Drawing.Size(53, 25);
|
||||
this.userLabel.TabIndex = 19;
|
||||
this.userLabel.Text = "User";
|
||||
//
|
||||
|
@ -426,9 +453,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.userComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.userComboBox.FormattingEnabled = true;
|
||||
this.userComboBox.Location = new System.Drawing.Point(123, 101);
|
||||
this.userComboBox.Location = new System.Drawing.Point(226, 186);
|
||||
this.userComboBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.userComboBox.Name = "userComboBox";
|
||||
this.userComboBox.Size = new System.Drawing.Size(137, 21);
|
||||
this.userComboBox.Size = new System.Drawing.Size(248, 32);
|
||||
this.userComboBox.TabIndex = 10;
|
||||
//
|
||||
// cronTriggerJobGroupBox
|
||||
|
@ -443,26 +471,30 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.cronTriggerJobGroupBox.Controls.Add(this.calculatedRunsTextBox);
|
||||
this.cronTriggerJobGroupBox.Controls.Add(this.moreExamplesButton);
|
||||
this.cronTriggerJobGroupBox.Enabled = false;
|
||||
this.cronTriggerJobGroupBox.Location = new System.Drawing.Point(229, 35);
|
||||
this.cronTriggerJobGroupBox.Location = new System.Drawing.Point(420, 65);
|
||||
this.cronTriggerJobGroupBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.cronTriggerJobGroupBox.Name = "cronTriggerJobGroupBox";
|
||||
this.cronTriggerJobGroupBox.Size = new System.Drawing.Size(234, 343);
|
||||
this.cronTriggerJobGroupBox.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.cronTriggerJobGroupBox.Size = new System.Drawing.Size(429, 633);
|
||||
this.cronTriggerJobGroupBox.TabIndex = 2;
|
||||
this.cronTriggerJobGroupBox.TabStop = false;
|
||||
//
|
||||
// cronExpressionLabel
|
||||
//
|
||||
this.cronExpressionLabel.AutoSize = true;
|
||||
this.cronExpressionLabel.Location = new System.Drawing.Point(6, 14);
|
||||
this.cronExpressionLabel.Location = new System.Drawing.Point(11, 26);
|
||||
this.cronExpressionLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.cronExpressionLabel.Name = "cronExpressionLabel";
|
||||
this.cronExpressionLabel.Size = new System.Drawing.Size(82, 13);
|
||||
this.cronExpressionLabel.Size = new System.Drawing.Size(155, 25);
|
||||
this.cronExpressionLabel.TabIndex = 23;
|
||||
this.cronExpressionLabel.Text = "Cron expression";
|
||||
//
|
||||
// cronExpressionTextBox
|
||||
//
|
||||
this.cronExpressionTextBox.Location = new System.Drawing.Point(9, 29);
|
||||
this.cronExpressionTextBox.Location = new System.Drawing.Point(17, 54);
|
||||
this.cronExpressionTextBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.cronExpressionTextBox.Name = "cronExpressionTextBox";
|
||||
this.cronExpressionTextBox.Size = new System.Drawing.Size(215, 20);
|
||||
this.cronExpressionTextBox.Size = new System.Drawing.Size(391, 29);
|
||||
this.cronExpressionTextBox.TabIndex = 17;
|
||||
this.cronExpressionTextBox.Text = "0 0/15 8-18 ? * MON-FRI *";
|
||||
//
|
||||
|
@ -470,10 +502,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.cronTriggerInfoTextBox.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.cronTriggerInfoTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.cronTriggerInfoTextBox.Location = new System.Drawing.Point(9, 51);
|
||||
this.cronTriggerInfoTextBox.Location = new System.Drawing.Point(17, 94);
|
||||
this.cronTriggerInfoTextBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.cronTriggerInfoTextBox.Multiline = true;
|
||||
this.cronTriggerInfoTextBox.Name = "cronTriggerInfoTextBox";
|
||||
this.cronTriggerInfoTextBox.Size = new System.Drawing.Size(215, 147);
|
||||
this.cronTriggerInfoTextBox.Size = new System.Drawing.Size(394, 271);
|
||||
this.cronTriggerInfoTextBox.TabIndex = 25;
|
||||
this.cronTriggerInfoTextBox.TabStop = false;
|
||||
this.cronTriggerInfoTextBox.Text = resources.GetString("cronTriggerInfoTextBox.Text");
|
||||
|
@ -481,18 +514,20 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// buildCronLabel
|
||||
//
|
||||
this.buildCronLabel.AutoSize = true;
|
||||
this.buildCronLabel.Location = new System.Drawing.Point(6, 201);
|
||||
this.buildCronLabel.Location = new System.Drawing.Point(11, 371);
|
||||
this.buildCronLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.buildCronLabel.Name = "buildCronLabel";
|
||||
this.buildCronLabel.Size = new System.Drawing.Size(119, 13);
|
||||
this.buildCronLabel.Size = new System.Drawing.Size(219, 25);
|
||||
this.buildCronLabel.TabIndex = 26;
|
||||
this.buildCronLabel.Text = "Build cron expression at";
|
||||
//
|
||||
// cronmakerLinkLabel
|
||||
//
|
||||
this.cronmakerLinkLabel.AutoSize = true;
|
||||
this.cronmakerLinkLabel.Location = new System.Drawing.Point(126, 201);
|
||||
this.cronmakerLinkLabel.Location = new System.Drawing.Point(231, 371);
|
||||
this.cronmakerLinkLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.cronmakerLinkLabel.Name = "cronmakerLinkLabel";
|
||||
this.cronmakerLinkLabel.Size = new System.Drawing.Size(80, 13);
|
||||
this.cronmakerLinkLabel.Size = new System.Drawing.Size(146, 25);
|
||||
this.cronmakerLinkLabel.TabIndex = 24;
|
||||
this.cronmakerLinkLabel.TabStop = true;
|
||||
this.cronmakerLinkLabel.Text = "cronmaker.com";
|
||||
|
@ -501,9 +536,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// cronDocsLinkLabel
|
||||
//
|
||||
this.cronDocsLinkLabel.AutoSize = true;
|
||||
this.cronDocsLinkLabel.Location = new System.Drawing.Point(6, 220);
|
||||
this.cronDocsLinkLabel.Location = new System.Drawing.Point(11, 406);
|
||||
this.cronDocsLinkLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.cronDocsLinkLabel.Name = "cronDocsLinkLabel";
|
||||
this.cronDocsLinkLabel.Size = new System.Drawing.Size(172, 13);
|
||||
this.cronDocsLinkLabel.Size = new System.Drawing.Size(316, 25);
|
||||
this.cronDocsLinkLabel.TabIndex = 30;
|
||||
this.cronDocsLinkLabel.TabStop = true;
|
||||
this.cronDocsLinkLabel.Text = "Quartz cron triggers documentation";
|
||||
|
@ -511,9 +547,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
// calculateNextRunsButton
|
||||
//
|
||||
this.calculateNextRunsButton.Location = new System.Drawing.Point(9, 240);
|
||||
this.calculateNextRunsButton.Location = new System.Drawing.Point(17, 443);
|
||||
this.calculateNextRunsButton.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.calculateNextRunsButton.Name = "calculateNextRunsButton";
|
||||
this.calculateNextRunsButton.Size = new System.Drawing.Size(105, 36);
|
||||
this.calculateNextRunsButton.Size = new System.Drawing.Size(193, 66);
|
||||
this.calculateNextRunsButton.TabIndex = 18;
|
||||
this.calculateNextRunsButton.Text = global::RecurringIntegrationsScheduler.Properties.Resources.Calculate_next_100_runs_of_cron_trigger;
|
||||
this.calculateNextRunsButton.UseVisualStyleBackColor = true;
|
||||
|
@ -522,19 +559,21 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// calculatedRunsTextBox
|
||||
//
|
||||
this.calculatedRunsTextBox.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.calculatedRunsTextBox.Location = new System.Drawing.Point(9, 280);
|
||||
this.calculatedRunsTextBox.Location = new System.Drawing.Point(17, 517);
|
||||
this.calculatedRunsTextBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.calculatedRunsTextBox.Multiline = true;
|
||||
this.calculatedRunsTextBox.Name = "calculatedRunsTextBox";
|
||||
this.calculatedRunsTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.calculatedRunsTextBox.Size = new System.Drawing.Size(145, 55);
|
||||
this.calculatedRunsTextBox.Size = new System.Drawing.Size(263, 98);
|
||||
this.calculatedRunsTextBox.TabIndex = 32;
|
||||
this.calculatedRunsTextBox.TabStop = false;
|
||||
//
|
||||
// moreExamplesButton
|
||||
//
|
||||
this.moreExamplesButton.Location = new System.Drawing.Point(158, 280);
|
||||
this.moreExamplesButton.Location = new System.Drawing.Point(290, 517);
|
||||
this.moreExamplesButton.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.moreExamplesButton.Name = "moreExamplesButton";
|
||||
this.moreExamplesButton.Size = new System.Drawing.Size(66, 55);
|
||||
this.moreExamplesButton.Size = new System.Drawing.Size(121, 102);
|
||||
this.moreExamplesButton.TabIndex = 19;
|
||||
this.moreExamplesButton.Text = global::RecurringIntegrationsScheduler.Properties.Resources.More_examples;
|
||||
this.moreExamplesButton.UseVisualStyleBackColor = true;
|
||||
|
@ -544,18 +583,20 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.triggerTypePanel.Controls.Add(this.simpleTriggerRadioButton);
|
||||
this.triggerTypePanel.Controls.Add(this.cronTriggerRadioButton);
|
||||
this.triggerTypePanel.Location = new System.Drawing.Point(5, 5);
|
||||
this.triggerTypePanel.Location = new System.Drawing.Point(9, 9);
|
||||
this.triggerTypePanel.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.triggerTypePanel.Name = "triggerTypePanel";
|
||||
this.triggerTypePanel.Size = new System.Drawing.Size(457, 25);
|
||||
this.triggerTypePanel.Size = new System.Drawing.Size(838, 46);
|
||||
this.triggerTypePanel.TabIndex = 29;
|
||||
//
|
||||
// simpleTriggerRadioButton
|
||||
//
|
||||
this.simpleTriggerRadioButton.AutoSize = true;
|
||||
this.simpleTriggerRadioButton.Checked = true;
|
||||
this.simpleTriggerRadioButton.Location = new System.Drawing.Point(6, 3);
|
||||
this.simpleTriggerRadioButton.Location = new System.Drawing.Point(11, 6);
|
||||
this.simpleTriggerRadioButton.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.simpleTriggerRadioButton.Name = "simpleTriggerRadioButton";
|
||||
this.simpleTriggerRadioButton.Size = new System.Drawing.Size(88, 17);
|
||||
this.simpleTriggerRadioButton.Size = new System.Drawing.Size(156, 29);
|
||||
this.simpleTriggerRadioButton.TabIndex = 15;
|
||||
this.simpleTriggerRadioButton.TabStop = true;
|
||||
this.simpleTriggerRadioButton.Text = global::RecurringIntegrationsScheduler.Properties.Resources.Simple_trigger;
|
||||
|
@ -564,9 +605,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// cronTriggerRadioButton
|
||||
//
|
||||
this.cronTriggerRadioButton.AutoSize = true;
|
||||
this.cronTriggerRadioButton.Location = new System.Drawing.Point(232, 3);
|
||||
this.cronTriggerRadioButton.Location = new System.Drawing.Point(425, 6);
|
||||
this.cronTriggerRadioButton.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.cronTriggerRadioButton.Name = "cronTriggerRadioButton";
|
||||
this.cronTriggerRadioButton.Size = new System.Drawing.Size(79, 17);
|
||||
this.cronTriggerRadioButton.Size = new System.Drawing.Size(139, 29);
|
||||
this.cronTriggerRadioButton.TabIndex = 16;
|
||||
this.cronTriggerRadioButton.Text = global::RecurringIntegrationsScheduler.Properties.Resources.Cron_trigger;
|
||||
this.cronTriggerRadioButton.UseVisualStyleBackColor = true;
|
||||
|
@ -575,10 +617,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// minutesLabel
|
||||
//
|
||||
this.minutesLabel.AutoSize = true;
|
||||
this.minutesLabel.Location = new System.Drawing.Point(131, 36);
|
||||
this.minutesLabel.Location = new System.Drawing.Point(240, 66);
|
||||
this.minutesLabel.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.minutesLabel.Name = "minutesLabel";
|
||||
this.minutesLabel.Size = new System.Drawing.Size(49, 13);
|
||||
this.minutesLabel.Size = new System.Drawing.Size(94, 25);
|
||||
this.minutesLabel.TabIndex = 5;
|
||||
this.minutesLabel.Text = "minute(s)";
|
||||
this.minutesLabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
|
@ -586,10 +628,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// hoursLabel
|
||||
//
|
||||
this.hoursLabel.AutoSize = true;
|
||||
this.hoursLabel.Location = new System.Drawing.Point(131, 14);
|
||||
this.hoursLabel.Location = new System.Drawing.Point(240, 26);
|
||||
this.hoursLabel.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.hoursLabel.Name = "hoursLabel";
|
||||
this.hoursLabel.Size = new System.Drawing.Size(39, 13);
|
||||
this.hoursLabel.Size = new System.Drawing.Size(75, 25);
|
||||
this.hoursLabel.TabIndex = 4;
|
||||
this.hoursLabel.Text = "hour(s)";
|
||||
this.hoursLabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
|
@ -597,9 +639,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// startAtLabel
|
||||
//
|
||||
this.startAtLabel.AutoSize = true;
|
||||
this.startAtLabel.Location = new System.Drawing.Point(28, 57);
|
||||
this.startAtLabel.Location = new System.Drawing.Point(51, 105);
|
||||
this.startAtLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.startAtLabel.Name = "startAtLabel";
|
||||
this.startAtLabel.Size = new System.Drawing.Size(53, 13);
|
||||
this.startAtLabel.Size = new System.Drawing.Size(96, 25);
|
||||
this.startAtLabel.TabIndex = 3;
|
||||
this.startAtLabel.Text = "starting at";
|
||||
this.startAtLabel.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
|
@ -608,10 +651,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.startAtDateTimePicker.CustomFormat = "HH:mm";
|
||||
this.startAtDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.startAtDateTimePicker.Location = new System.Drawing.Point(87, 54);
|
||||
this.startAtDateTimePicker.Location = new System.Drawing.Point(160, 100);
|
||||
this.startAtDateTimePicker.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.startAtDateTimePicker.Name = "startAtDateTimePicker";
|
||||
this.startAtDateTimePicker.ShowUpDown = true;
|
||||
this.startAtDateTimePicker.Size = new System.Drawing.Size(52, 20);
|
||||
this.startAtDateTimePicker.Size = new System.Drawing.Size(92, 29);
|
||||
this.startAtDateTimePicker.TabIndex = 14;
|
||||
this.startAtDateTimePicker.Value = new System.DateTime(2016, 6, 26, 0, 0, 0, 0);
|
||||
//
|
||||
|
@ -619,10 +663,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.minutesDateTimePicker.CustomFormat = "mm";
|
||||
this.minutesDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.minutesDateTimePicker.Location = new System.Drawing.Point(87, 32);
|
||||
this.minutesDateTimePicker.Location = new System.Drawing.Point(160, 59);
|
||||
this.minutesDateTimePicker.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.minutesDateTimePicker.Name = "minutesDateTimePicker";
|
||||
this.minutesDateTimePicker.ShowUpDown = true;
|
||||
this.minutesDateTimePicker.Size = new System.Drawing.Size(43, 20);
|
||||
this.minutesDateTimePicker.Size = new System.Drawing.Size(76, 29);
|
||||
this.minutesDateTimePicker.TabIndex = 13;
|
||||
this.minutesDateTimePicker.Value = new System.DateTime(2016, 6, 26, 0, 1, 0, 0);
|
||||
//
|
||||
|
@ -630,20 +675,21 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.hoursDateTimePicker.CustomFormat = "HH";
|
||||
this.hoursDateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.hoursDateTimePicker.Location = new System.Drawing.Point(87, 10);
|
||||
this.hoursDateTimePicker.Location = new System.Drawing.Point(160, 18);
|
||||
this.hoursDateTimePicker.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.hoursDateTimePicker.Name = "hoursDateTimePicker";
|
||||
this.hoursDateTimePicker.ShowUpDown = true;
|
||||
this.hoursDateTimePicker.Size = new System.Drawing.Size(43, 20);
|
||||
this.hoursDateTimePicker.Size = new System.Drawing.Size(76, 29);
|
||||
this.hoursDateTimePicker.TabIndex = 12;
|
||||
this.hoursDateTimePicker.Value = new System.DateTime(2016, 6, 26, 0, 0, 0, 0);
|
||||
//
|
||||
// pauseIndefinitelyCheckBox
|
||||
//
|
||||
this.pauseIndefinitelyCheckBox.AutoSize = true;
|
||||
this.pauseIndefinitelyCheckBox.Location = new System.Drawing.Point(7, 187);
|
||||
this.pauseIndefinitelyCheckBox.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pauseIndefinitelyCheckBox.Location = new System.Drawing.Point(13, 345);
|
||||
this.pauseIndefinitelyCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.pauseIndefinitelyCheckBox.Name = "pauseIndefinitelyCheckBox";
|
||||
this.pauseIndefinitelyCheckBox.Size = new System.Drawing.Size(201, 17);
|
||||
this.pauseIndefinitelyCheckBox.Size = new System.Drawing.Size(357, 29);
|
||||
this.pauseIndefinitelyCheckBox.TabIndex = 0;
|
||||
this.pauseIndefinitelyCheckBox.Text = "Don\'t execute the job. Always pause.";
|
||||
this.pauseIndefinitelyCheckBox.UseVisualStyleBackColor = true;
|
||||
|
@ -654,9 +700,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.retryPolicyGroupBox.Controls.Add(this.retriesCountUpDown);
|
||||
this.retryPolicyGroupBox.Controls.Add(this.retriesDelayLabel);
|
||||
this.retryPolicyGroupBox.Controls.Add(this.retriesDelayUpDown);
|
||||
this.retryPolicyGroupBox.Location = new System.Drawing.Point(7, 22);
|
||||
this.retryPolicyGroupBox.Location = new System.Drawing.Point(13, 41);
|
||||
this.retryPolicyGroupBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.retryPolicyGroupBox.Name = "retryPolicyGroupBox";
|
||||
this.retryPolicyGroupBox.Size = new System.Drawing.Size(202, 67);
|
||||
this.retryPolicyGroupBox.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.retryPolicyGroupBox.Size = new System.Drawing.Size(370, 124);
|
||||
this.retryPolicyGroupBox.TabIndex = 7;
|
||||
this.retryPolicyGroupBox.TabStop = false;
|
||||
this.retryPolicyGroupBox.Text = "Retry policy";
|
||||
|
@ -664,22 +712,24 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// retriesLabel
|
||||
//
|
||||
this.retriesLabel.AutoSize = true;
|
||||
this.retriesLabel.Location = new System.Drawing.Point(7, 20);
|
||||
this.retriesLabel.Location = new System.Drawing.Point(13, 37);
|
||||
this.retriesLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.retriesLabel.Name = "retriesLabel";
|
||||
this.retriesLabel.Size = new System.Drawing.Size(87, 13);
|
||||
this.retriesLabel.Size = new System.Drawing.Size(160, 25);
|
||||
this.retriesLabel.TabIndex = 0;
|
||||
this.retriesLabel.Text = "Number of retries";
|
||||
//
|
||||
// retriesCountUpDown
|
||||
//
|
||||
this.retriesCountUpDown.Location = new System.Drawing.Point(104, 15);
|
||||
this.retriesCountUpDown.Location = new System.Drawing.Point(191, 28);
|
||||
this.retriesCountUpDown.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.retriesCountUpDown.Maximum = new decimal(new int[] {
|
||||
9999,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.retriesCountUpDown.Name = "retriesCountUpDown";
|
||||
this.retriesCountUpDown.Size = new System.Drawing.Size(48, 20);
|
||||
this.retriesCountUpDown.Size = new System.Drawing.Size(88, 29);
|
||||
this.retriesCountUpDown.TabIndex = 6;
|
||||
this.retriesCountUpDown.Value = new decimal(new int[] {
|
||||
1,
|
||||
|
@ -690,22 +740,24 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// retriesDelayLabel
|
||||
//
|
||||
this.retriesDelayLabel.AutoSize = true;
|
||||
this.retriesDelayLabel.Location = new System.Drawing.Point(7, 44);
|
||||
this.retriesDelayLabel.Location = new System.Drawing.Point(13, 81);
|
||||
this.retriesDelayLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.retriesDelayLabel.Name = "retriesDelayLabel";
|
||||
this.retriesDelayLabel.Size = new System.Drawing.Size(83, 13);
|
||||
this.retriesDelayLabel.Size = new System.Drawing.Size(155, 25);
|
||||
this.retriesDelayLabel.TabIndex = 2;
|
||||
this.retriesDelayLabel.Text = "Delay (seconds)";
|
||||
//
|
||||
// retriesDelayUpDown
|
||||
//
|
||||
this.retriesDelayUpDown.Location = new System.Drawing.Point(104, 39);
|
||||
this.retriesDelayUpDown.Location = new System.Drawing.Point(191, 72);
|
||||
this.retriesDelayUpDown.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.retriesDelayUpDown.Maximum = new decimal(new int[] {
|
||||
86400,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.retriesDelayUpDown.Name = "retriesDelayUpDown";
|
||||
this.retriesDelayUpDown.Size = new System.Drawing.Size(48, 20);
|
||||
this.retriesDelayUpDown.Size = new System.Drawing.Size(88, 29);
|
||||
this.retriesDelayUpDown.TabIndex = 7;
|
||||
this.retriesDelayUpDown.Value = new decimal(new int[] {
|
||||
60,
|
||||
|
@ -716,11 +768,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// groupBoxExceptions
|
||||
//
|
||||
this.groupBoxExceptions.Controls.Add(this.pauseOnExceptionsCheckBox);
|
||||
this.groupBoxExceptions.Location = new System.Drawing.Point(7, 95);
|
||||
this.groupBoxExceptions.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.groupBoxExceptions.Location = new System.Drawing.Point(13, 175);
|
||||
this.groupBoxExceptions.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.groupBoxExceptions.Name = "groupBoxExceptions";
|
||||
this.groupBoxExceptions.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.groupBoxExceptions.Size = new System.Drawing.Size(202, 40);
|
||||
this.groupBoxExceptions.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.groupBoxExceptions.Size = new System.Drawing.Size(370, 74);
|
||||
this.groupBoxExceptions.TabIndex = 10;
|
||||
this.groupBoxExceptions.TabStop = false;
|
||||
this.groupBoxExceptions.Text = "Exceptions";
|
||||
|
@ -730,10 +782,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.pauseOnExceptionsCheckBox.AutoSize = true;
|
||||
this.pauseOnExceptionsCheckBox.Checked = true;
|
||||
this.pauseOnExceptionsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.pauseOnExceptionsCheckBox.Location = new System.Drawing.Point(9, 17);
|
||||
this.pauseOnExceptionsCheckBox.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.pauseOnExceptionsCheckBox.Location = new System.Drawing.Point(17, 31);
|
||||
this.pauseOnExceptionsCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.pauseOnExceptionsCheckBox.Name = "pauseOnExceptionsCheckBox";
|
||||
this.pauseOnExceptionsCheckBox.Size = new System.Drawing.Size(186, 17);
|
||||
this.pauseOnExceptionsCheckBox.Size = new System.Drawing.Size(329, 29);
|
||||
this.pauseOnExceptionsCheckBox.TabIndex = 0;
|
||||
this.pauseOnExceptionsCheckBox.Text = "Pause job when exception occurs";
|
||||
this.pauseOnExceptionsCheckBox.UseVisualStyleBackColor = true;
|
||||
|
@ -746,9 +798,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.jobTabControl.Controls.Add(this.connectionTabPage);
|
||||
this.jobTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.jobTabControl.Location = new System.Drawing.Point(0, 0);
|
||||
this.jobTabControl.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobTabControl.Name = "jobTabControl";
|
||||
this.jobTabControl.SelectedIndex = 0;
|
||||
this.jobTabControl.Size = new System.Drawing.Size(714, 496);
|
||||
this.jobTabControl.Size = new System.Drawing.Size(1309, 922);
|
||||
this.jobTabControl.TabIndex = 12;
|
||||
//
|
||||
// jobOverviewTabPage
|
||||
|
@ -757,21 +810,25 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.jobOverviewTabPage.Controls.Add(this.jobIdentificationGroupBox);
|
||||
this.jobOverviewTabPage.Controls.Add(this.jobControlGroupBox);
|
||||
this.jobOverviewTabPage.Controls.Add(this.foldersGroupBox);
|
||||
this.jobOverviewTabPage.Location = new System.Drawing.Point(4, 22);
|
||||
this.jobOverviewTabPage.Location = new System.Drawing.Point(4, 33);
|
||||
this.jobOverviewTabPage.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobOverviewTabPage.Name = "jobOverviewTabPage";
|
||||
this.jobOverviewTabPage.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.jobOverviewTabPage.Size = new System.Drawing.Size(706, 470);
|
||||
this.jobOverviewTabPage.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobOverviewTabPage.Size = new System.Drawing.Size(1301, 885);
|
||||
this.jobOverviewTabPage.TabIndex = 0;
|
||||
this.jobOverviewTabPage.Text = "Download job overview";
|
||||
//
|
||||
// jobControlGroupBox
|
||||
//
|
||||
this.jobControlGroupBox.Controls.Add(this.groupBoxLogging);
|
||||
this.jobControlGroupBox.Controls.Add(this.retryPolicyGroupBox);
|
||||
this.jobControlGroupBox.Controls.Add(this.groupBoxExceptions);
|
||||
this.jobControlGroupBox.Controls.Add(this.pauseIndefinitelyCheckBox);
|
||||
this.jobControlGroupBox.Location = new System.Drawing.Point(4, 211);
|
||||
this.jobControlGroupBox.Location = new System.Drawing.Point(7, 390);
|
||||
this.jobControlGroupBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobControlGroupBox.Name = "jobControlGroupBox";
|
||||
this.jobControlGroupBox.Size = new System.Drawing.Size(214, 207);
|
||||
this.jobControlGroupBox.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobControlGroupBox.Size = new System.Drawing.Size(392, 382);
|
||||
this.jobControlGroupBox.TabIndex = 12;
|
||||
this.jobControlGroupBox.TabStop = false;
|
||||
this.jobControlGroupBox.Text = "Job control";
|
||||
|
@ -785,9 +842,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.foldersGroupBox.Controls.Add(this.errorsFolderLabel);
|
||||
this.foldersGroupBox.Controls.Add(this.errorsFolder);
|
||||
this.foldersGroupBox.Controls.Add(this.errorsFolderBrowserButton);
|
||||
this.foldersGroupBox.Location = new System.Drawing.Point(223, 4);
|
||||
this.foldersGroupBox.Location = new System.Drawing.Point(409, 7);
|
||||
this.foldersGroupBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.foldersGroupBox.Name = "foldersGroupBox";
|
||||
this.foldersGroupBox.Size = new System.Drawing.Size(223, 144);
|
||||
this.foldersGroupBox.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.foldersGroupBox.Size = new System.Drawing.Size(409, 266);
|
||||
this.foldersGroupBox.TabIndex = 11;
|
||||
this.foldersGroupBox.TabStop = false;
|
||||
this.foldersGroupBox.Text = "Folders";
|
||||
|
@ -796,10 +855,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.jobDetailsTabPage.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.jobDetailsTabPage.Controls.Add(this.jobDetailsGroupBox);
|
||||
this.jobDetailsTabPage.Location = new System.Drawing.Point(4, 22);
|
||||
this.jobDetailsTabPage.Location = new System.Drawing.Point(4, 33);
|
||||
this.jobDetailsTabPage.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobDetailsTabPage.Name = "jobDetailsTabPage";
|
||||
this.jobDetailsTabPage.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.jobDetailsTabPage.Size = new System.Drawing.Size(709, 476);
|
||||
this.jobDetailsTabPage.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobDetailsTabPage.Size = new System.Drawing.Size(1301, 879);
|
||||
this.jobDetailsTabPage.TabIndex = 1;
|
||||
this.jobDetailsTabPage.Text = "Download job details";
|
||||
//
|
||||
|
@ -812,9 +872,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.jobDetailsGroupBox.Controls.Add(this.deletePackageCheckBox);
|
||||
this.jobDetailsGroupBox.Controls.Add(this.delayBetweenFilesLabel);
|
||||
this.jobDetailsGroupBox.Controls.Add(this.delayBetweenFilesNumericUpDown);
|
||||
this.jobDetailsGroupBox.Location = new System.Drawing.Point(4, 4);
|
||||
this.jobDetailsGroupBox.Location = new System.Drawing.Point(7, 7);
|
||||
this.jobDetailsGroupBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobDetailsGroupBox.Name = "jobDetailsGroupBox";
|
||||
this.jobDetailsGroupBox.Size = new System.Drawing.Size(230, 188);
|
||||
this.jobDetailsGroupBox.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.jobDetailsGroupBox.Size = new System.Drawing.Size(422, 347);
|
||||
this.jobDetailsGroupBox.TabIndex = 27;
|
||||
this.jobDetailsGroupBox.TabStop = false;
|
||||
this.jobDetailsGroupBox.Text = "Job details";
|
||||
|
@ -822,9 +884,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
// dataJobLabel
|
||||
//
|
||||
this.dataJobLabel.AutoSize = true;
|
||||
this.dataJobLabel.Location = new System.Drawing.Point(4, 20);
|
||||
this.dataJobLabel.Location = new System.Drawing.Point(7, 37);
|
||||
this.dataJobLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.dataJobLabel.Name = "dataJobLabel";
|
||||
this.dataJobLabel.Size = new System.Drawing.Size(107, 13);
|
||||
this.dataJobLabel.Size = new System.Drawing.Size(195, 25);
|
||||
this.dataJobLabel.TabIndex = 29;
|
||||
this.dataJobLabel.Text = "Data job in Dynamics";
|
||||
//
|
||||
|
@ -832,9 +895,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.dataJobComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.dataJobComboBox.FormattingEnabled = true;
|
||||
this.dataJobComboBox.Location = new System.Drawing.Point(7, 39);
|
||||
this.dataJobComboBox.Location = new System.Drawing.Point(13, 72);
|
||||
this.dataJobComboBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.dataJobComboBox.Name = "dataJobComboBox";
|
||||
this.dataJobComboBox.Size = new System.Drawing.Size(214, 21);
|
||||
this.dataJobComboBox.Size = new System.Drawing.Size(389, 32);
|
||||
this.dataJobComboBox.TabIndex = 28;
|
||||
//
|
||||
// recurrenceTabPage
|
||||
|
@ -843,10 +907,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.recurrenceTabPage.Controls.Add(this.triggerTypePanel);
|
||||
this.recurrenceTabPage.Controls.Add(this.simpleTriggerJobGroupBox);
|
||||
this.recurrenceTabPage.Controls.Add(this.cronTriggerJobGroupBox);
|
||||
this.recurrenceTabPage.Location = new System.Drawing.Point(4, 22);
|
||||
this.recurrenceTabPage.Location = new System.Drawing.Point(4, 33);
|
||||
this.recurrenceTabPage.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.recurrenceTabPage.Name = "recurrenceTabPage";
|
||||
this.recurrenceTabPage.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.recurrenceTabPage.Size = new System.Drawing.Size(709, 476);
|
||||
this.recurrenceTabPage.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.recurrenceTabPage.Size = new System.Drawing.Size(1301, 879);
|
||||
this.recurrenceTabPage.TabIndex = 2;
|
||||
this.recurrenceTabPage.Text = "Download job recurrence";
|
||||
//
|
||||
|
@ -860,28 +925,31 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.simpleTriggerJobGroupBox.Controls.Add(this.minutesLabel);
|
||||
this.simpleTriggerJobGroupBox.Controls.Add(this.startAtLabel);
|
||||
this.simpleTriggerJobGroupBox.Controls.Add(this.startAtDateTimePicker);
|
||||
this.simpleTriggerJobGroupBox.Location = new System.Drawing.Point(5, 35);
|
||||
this.simpleTriggerJobGroupBox.Location = new System.Drawing.Point(9, 65);
|
||||
this.simpleTriggerJobGroupBox.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.simpleTriggerJobGroupBox.Name = "simpleTriggerJobGroupBox";
|
||||
this.simpleTriggerJobGroupBox.Size = new System.Drawing.Size(220, 84);
|
||||
this.simpleTriggerJobGroupBox.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.simpleTriggerJobGroupBox.Size = new System.Drawing.Size(403, 155);
|
||||
this.simpleTriggerJobGroupBox.TabIndex = 30;
|
||||
this.simpleTriggerJobGroupBox.TabStop = false;
|
||||
//
|
||||
// runEveryLabel
|
||||
//
|
||||
this.runEveryLabel.AutoSize = true;
|
||||
this.runEveryLabel.Location = new System.Drawing.Point(3, 14);
|
||||
this.runEveryLabel.Location = new System.Drawing.Point(6, 26);
|
||||
this.runEveryLabel.Margin = new System.Windows.Forms.Padding(6, 0, 6, 0);
|
||||
this.runEveryLabel.Name = "runEveryLabel";
|
||||
this.runEveryLabel.Size = new System.Drawing.Size(82, 13);
|
||||
this.runEveryLabel.Size = new System.Drawing.Size(146, 25);
|
||||
this.runEveryLabel.TabIndex = 32;
|
||||
this.runEveryLabel.Text = "Run job every...";
|
||||
//
|
||||
// andOrLabel
|
||||
//
|
||||
this.andOrLabel.AutoSize = true;
|
||||
this.andOrLabel.Location = new System.Drawing.Point(46, 36);
|
||||
this.andOrLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
|
||||
this.andOrLabel.Location = new System.Drawing.Point(84, 66);
|
||||
this.andOrLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
|
||||
this.andOrLabel.Name = "andOrLabel";
|
||||
this.andOrLabel.Size = new System.Drawing.Size(39, 13);
|
||||
this.andOrLabel.Size = new System.Drawing.Size(68, 25);
|
||||
this.andOrLabel.TabIndex = 33;
|
||||
this.andOrLabel.Text = "and/or";
|
||||
//
|
||||
|
@ -889,22 +957,25 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
//
|
||||
this.connectionTabPage.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.connectionTabPage.Controls.Add(this.axDetailsGroupBox);
|
||||
this.connectionTabPage.Location = new System.Drawing.Point(4, 22);
|
||||
this.connectionTabPage.Location = new System.Drawing.Point(4, 33);
|
||||
this.connectionTabPage.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.connectionTabPage.Name = "connectionTabPage";
|
||||
this.connectionTabPage.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.connectionTabPage.Size = new System.Drawing.Size(709, 476);
|
||||
this.connectionTabPage.Padding = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.connectionTabPage.Size = new System.Drawing.Size(1301, 879);
|
||||
this.connectionTabPage.TabIndex = 3;
|
||||
this.connectionTabPage.Text = "Connection";
|
||||
//
|
||||
// mainToolStrip
|
||||
//
|
||||
this.mainToolStrip.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.mainToolStrip.ImageScalingSize = new System.Drawing.Size(28, 28);
|
||||
this.mainToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cancelToolStripButton,
|
||||
this.addToolStripButton});
|
||||
this.mainToolStrip.Location = new System.Drawing.Point(0, 496);
|
||||
this.mainToolStrip.Location = new System.Drawing.Point(0, 922);
|
||||
this.mainToolStrip.Name = "mainToolStrip";
|
||||
this.mainToolStrip.Size = new System.Drawing.Size(714, 25);
|
||||
this.mainToolStrip.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
|
||||
this.mainToolStrip.Size = new System.Drawing.Size(1309, 40);
|
||||
this.mainToolStrip.TabIndex = 13;
|
||||
//
|
||||
// cancelToolStripButton
|
||||
|
@ -914,7 +985,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.cancelToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("cancelToolStripButton.Image")));
|
||||
this.cancelToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.cancelToolStripButton.Name = "cancelToolStripButton";
|
||||
this.cancelToolStripButton.Size = new System.Drawing.Size(47, 22);
|
||||
this.cancelToolStripButton.Size = new System.Drawing.Size(79, 34);
|
||||
this.cancelToolStripButton.Text = "Cancel";
|
||||
this.cancelToolStripButton.Click += new System.EventHandler(this.CancelToolStripButton_Click);
|
||||
//
|
||||
|
@ -925,23 +996,47 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.addToolStripButton.Image = ((System.Drawing.Image)(resources.GetObject("addToolStripButton.Image")));
|
||||
this.addToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.addToolStripButton.Name = "addToolStripButton";
|
||||
this.addToolStripButton.Size = new System.Drawing.Size(53, 22);
|
||||
this.addToolStripButton.Size = new System.Drawing.Size(90, 34);
|
||||
this.addToolStripButton.Text = "Add job";
|
||||
this.addToolStripButton.Click += new System.EventHandler(this.AddToolStripButton_Click);
|
||||
//
|
||||
// groupBoxLogging
|
||||
//
|
||||
this.groupBoxLogging.Controls.Add(this.verboseLoggingCheckBox);
|
||||
this.groupBoxLogging.Location = new System.Drawing.Point(13, 257);
|
||||
this.groupBoxLogging.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.groupBoxLogging.Name = "groupBoxLogging";
|
||||
this.groupBoxLogging.Padding = new System.Windows.Forms.Padding(4);
|
||||
this.groupBoxLogging.Size = new System.Drawing.Size(370, 74);
|
||||
this.groupBoxLogging.TabIndex = 13;
|
||||
this.groupBoxLogging.TabStop = false;
|
||||
this.groupBoxLogging.Text = "Verbose logging";
|
||||
//
|
||||
// verboseLoggingCheckBox
|
||||
//
|
||||
this.verboseLoggingCheckBox.AutoSize = true;
|
||||
this.verboseLoggingCheckBox.Location = new System.Drawing.Point(17, 31);
|
||||
this.verboseLoggingCheckBox.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.verboseLoggingCheckBox.Name = "verboseLoggingCheckBox";
|
||||
this.verboseLoggingCheckBox.Size = new System.Drawing.Size(216, 29);
|
||||
this.verboseLoggingCheckBox.TabIndex = 0;
|
||||
this.verboseLoggingCheckBox.Text = "Use verbose logging";
|
||||
this.verboseLoggingCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// DownloadJobV3
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 24F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSize = true;
|
||||
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.ClientSize = new System.Drawing.Size(714, 521);
|
||||
this.ClientSize = new System.Drawing.Size(1309, 962);
|
||||
this.Controls.Add(this.jobTabControl);
|
||||
this.Controls.Add(this.mainToolStrip);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Margin = new System.Windows.Forms.Padding(6, 6, 6, 6);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(730, 560);
|
||||
this.MinimumSize = new System.Drawing.Size(1318, 980);
|
||||
this.Name = "DownloadJobV3";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
|
@ -980,6 +1075,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
this.connectionTabPage.ResumeLayout(false);
|
||||
this.mainToolStrip.ResumeLayout(false);
|
||||
this.mainToolStrip.PerformLayout();
|
||||
this.groupBoxLogging.ResumeLayout(false);
|
||||
this.groupBoxLogging.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
|
@ -1060,5 +1157,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
private System.Windows.Forms.Label andOrLabel;
|
||||
private System.Windows.Forms.ComboBox dataJobComboBox;
|
||||
private System.Windows.Forms.Label dataJobLabel;
|
||||
private System.Windows.Forms.GroupBox groupBoxLogging;
|
||||
private System.Windows.Forms.CheckBox verboseLoggingCheckBox;
|
||||
}
|
||||
}
|
|
@ -238,6 +238,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
(JobDetail.JobDataMap[SettingsConstants.PauseJobOnException] != null) &&
|
||||
Convert.ToBoolean(JobDetail.JobDataMap[SettingsConstants.PauseJobOnException].ToString());
|
||||
|
||||
verboseLoggingCheckBox.Checked =
|
||||
(JobDetail.JobDataMap[SettingsConstants.LogVerbose] != null) &&
|
||||
Convert.ToBoolean(JobDetail.JobDataMap[SettingsConstants.LogVerbose].ToString());
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
|
@ -385,6 +389,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
{SettingsConstants.PauseJobOnException, pauseOnExceptionsCheckBox.Checked.ToString()},
|
||||
{SettingsConstants.IndefinitePause, pauseIndefinitelyCheckBox.Checked.ToString()},
|
||||
{SettingsConstants.DelayBetweenFiles, delayBetweenFilesNumericUpDown.Value.ToString(CultureInfo.InvariantCulture)},
|
||||
{SettingsConstants.LogVerbose, verboseLoggingCheckBox.Checked.ToString()}
|
||||
};
|
||||
if (serviceAuthRadioButton.Checked)
|
||||
{
|
||||
|
|
|
@ -132,7 +132,7 @@ Default example above means: Each working day of the week (MON-FRI) run every 15
|
|||
<data name="cancelToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YQUAAAAJcEhZcwAAGdYAABnWARjRyu0AAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
|
@ -147,7 +147,7 @@ Default example above means: Each working day of the week (MON-FRI) run every 15
|
|||
<data name="addToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YQUAAAAJcEhZcwAAGdYAABnWARjRyu0AAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
|
|
|
@ -79,9 +79,9 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
|
||||
errorsFolder.Text = Properties.Settings.Default.DownloadErrorsFolder;
|
||||
|
||||
exportToPackagePath = OdataActionsConstants.ExportToPackageActionPath;
|
||||
getExecutionSummaryStatusPath = OdataActionsConstants.GetExecutionSummaryStatusActionPath;
|
||||
getExportedPackageUrlPath = OdataActionsConstants.GetExportedPackageUrlActionPath;
|
||||
exportToPackagePath = PackageApiActions.ExportToPackageActionPath;
|
||||
getExecutionSummaryStatusPath = PackageApiActions.GetExecutionSummaryStatusActionPath;
|
||||
getExportedPackageUrlPath = PackageApiActions.GetExportedPackageUrlActionPath;
|
||||
|
||||
if ((JobDetail != null) && (Trigger != null))
|
||||
{
|
||||
|
@ -225,9 +225,9 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
(JobDetail.JobDataMap[SettingsConstants.PauseJobOnException] != null) &&
|
||||
Convert.ToBoolean(JobDetail.JobDataMap[SettingsConstants.PauseJobOnException].ToString());
|
||||
|
||||
exportToPackagePath = JobDetail.JobDataMap[SettingsConstants.ExportToPackageActionPath]?.ToString() ?? OdataActionsConstants.ExportToPackageActionPath;
|
||||
getExecutionSummaryStatusPath = JobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryStatusActionPath]?.ToString() ?? OdataActionsConstants.GetExecutionSummaryStatusActionPath;
|
||||
getExportedPackageUrlPath = JobDetail.JobDataMap[SettingsConstants.GetExportedPackageUrlActionPath]?.ToString() ?? OdataActionsConstants.GetExportedPackageUrlActionPath;
|
||||
exportToPackagePath = JobDetail.JobDataMap[SettingsConstants.ExportToPackageActionPath]?.ToString() ?? PackageApiActions.ExportToPackageActionPath;
|
||||
getExecutionSummaryStatusPath = JobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryStatusActionPath]?.ToString() ?? PackageApiActions.GetExecutionSummaryStatusActionPath;
|
||||
getExportedPackageUrlPath = JobDetail.JobDataMap[SettingsConstants.GetExportedPackageUrlActionPath]?.ToString() ?? PackageApiActions.GetExportedPackageUrlActionPath;
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -32,7 +32,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
get
|
||||
{
|
||||
var myCp = base.CreateParams;
|
||||
myCp.ClassStyle = myCp.ClassStyle | CpNocloseButton;
|
||||
myCp.ClassStyle |= CpNocloseButton;
|
||||
return myCp;
|
||||
}
|
||||
}
|
||||
|
@ -75,9 +75,9 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
|
||||
errorsFolder.Text = Properties.Settings.Default.DownloadErrorsFolder;
|
||||
|
||||
exportToPackageTextBox.Text = OdataActionsConstants.ExportToPackageActionPath;
|
||||
getExecutionSummaryStatusTextBox.Text = OdataActionsConstants.GetExecutionSummaryStatusActionPath;
|
||||
getExportedPackageUrlTextBox.Text = OdataActionsConstants.GetExportedPackageUrlActionPath;
|
||||
exportToPackageTextBox.Text = PackageApiActions.ExportToPackageActionPath;
|
||||
getExecutionSummaryStatusTextBox.Text = PackageApiActions.GetExecutionSummaryStatusActionPath;
|
||||
getExportedPackageUrlTextBox.Text = PackageApiActions.GetExportedPackageUrlActionPath;
|
||||
|
||||
if ((JobDetail != null) && (Trigger != null))
|
||||
{
|
||||
|
@ -220,9 +220,13 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
(JobDetail.JobDataMap[SettingsConstants.PauseJobOnException] != null) &&
|
||||
Convert.ToBoolean(JobDetail.JobDataMap[SettingsConstants.PauseJobOnException].ToString());
|
||||
|
||||
exportToPackageTextBox.Text = JobDetail.JobDataMap[SettingsConstants.ExportToPackageActionPath]?.ToString() ?? OdataActionsConstants.ExportToPackageActionPath;
|
||||
getExecutionSummaryStatusTextBox.Text = JobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryStatusActionPath]?.ToString() ?? OdataActionsConstants.GetExecutionSummaryStatusActionPath;
|
||||
getExportedPackageUrlTextBox.Text = JobDetail.JobDataMap[SettingsConstants.GetExportedPackageUrlActionPath]?.ToString() ?? OdataActionsConstants.GetExportedPackageUrlActionPath;
|
||||
exportToPackageTextBox.Text = JobDetail.JobDataMap[SettingsConstants.ExportToPackageActionPath]?.ToString() ?? PackageApiActions.ExportToPackageActionPath;
|
||||
getExecutionSummaryStatusTextBox.Text = JobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryStatusActionPath]?.ToString() ?? PackageApiActions.GetExecutionSummaryStatusActionPath;
|
||||
getExportedPackageUrlTextBox.Text = JobDetail.JobDataMap[SettingsConstants.GetExportedPackageUrlActionPath]?.ToString() ?? PackageApiActions.GetExportedPackageUrlActionPath;
|
||||
|
||||
verboseLoggingCheckBox.Checked =
|
||||
(JobDetail.JobDataMap[SettingsConstants.LogVerbose] != null) &&
|
||||
Convert.ToBoolean(JobDetail.JobDataMap[SettingsConstants.LogVerbose].ToString());
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
@ -349,7 +353,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
if (simpleTriggerRadioButton.Checked)
|
||||
{
|
||||
var minutes = hoursDateTimePicker.Value.Hour*60;
|
||||
minutes = minutes + minutesDateTimePicker.Value.Minute;
|
||||
minutes += minutesDateTimePicker.Value.Minute;
|
||||
|
||||
return builder.WithSimpleSchedule(x => x
|
||||
.WithIntervalInMinutes(minutes)
|
||||
|
@ -391,7 +395,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
{SettingsConstants.ExportToPackageActionPath, exportToPackageTextBox.Text},
|
||||
{SettingsConstants.GetExecutionSummaryStatusActionPath, getExecutionSummaryStatusTextBox.Text},
|
||||
{SettingsConstants.GetExportedPackageUrlActionPath, getExportedPackageUrlTextBox.Text},
|
||||
{SettingsConstants.IndefinitePause, pauseIndefinitelyCheckBox.Checked.ToString()}
|
||||
{SettingsConstants.IndefinitePause, pauseIndefinitelyCheckBox.Checked.ToString()},
|
||||
{SettingsConstants.LogVerbose, verboseLoggingCheckBox.Checked.ToString()}
|
||||
};
|
||||
if (serviceAuthRadioButton.Checked)
|
||||
{
|
||||
|
|
|
@ -132,7 +132,7 @@ Default example above means: Each working day of the week (MON-FRI) run every 15
|
|||
<data name="cancelToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YQUAAAAJcEhZcwAAGdYAABnWARjRyu0AAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
|
@ -147,7 +147,7 @@ Default example above means: Each working day of the week (MON-FRI) run every 15
|
|||
<data name="addToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YQUAAAAJcEhZcwAAGdYAABnWARjRyu0AAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
|
|
|
@ -91,12 +91,12 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
processingSuccessFolderTextBox.Text = Properties.Settings.Default.ProcessingSuccessFolder;
|
||||
processingErrorsFolderTextBox.Text = Properties.Settings.Default.ProcessingErrorsFolder;
|
||||
|
||||
importFromPackagePath = OdataActionsConstants.ImportFromPackageActionPath;
|
||||
getAzureWriteUrlPath = OdataActionsConstants.GetAzureWriteUrlActionPath;
|
||||
getExecutionSummaryStatusPath = OdataActionsConstants.GetExecutionSummaryStatusActionPath;
|
||||
getExecutionSummaryPageUrlPath = OdataActionsConstants.GetExecutionSummaryPageUrlActionPath;
|
||||
getImportTargetErrorKeysFileUrlPath = OdataActionsConstants.GetImportTargetErrorKeysFileUrlPath;
|
||||
generateImportTargetErrorKeysFilePath = OdataActionsConstants.GenerateImportTargetErrorKeysFilePath;
|
||||
importFromPackagePath = PackageApiActions.ImportFromPackageActionPath;
|
||||
getAzureWriteUrlPath = PackageApiActions.GetAzureWriteUrlActionPath;
|
||||
getExecutionSummaryStatusPath = PackageApiActions.GetExecutionSummaryStatusActionPath;
|
||||
getExecutionSummaryPageUrlPath = PackageApiActions.GetExecutionSummaryPageUrlActionPath;
|
||||
getImportTargetErrorKeysFileUrlPath = PackageApiActions.GetImportTargetErrorKeysFileUrlPath;
|
||||
generateImportTargetErrorKeysFilePath = PackageApiActions.GenerateImportTargetErrorKeysFilePath;
|
||||
|
||||
if (ImportJobDetail != null)
|
||||
{
|
||||
|
@ -262,8 +262,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
(ImportJobDetail.JobDataMap[SettingsConstants.PauseJobOnException] != null) &&
|
||||
Convert.ToBoolean(ImportJobDetail.JobDataMap[SettingsConstants.PauseJobOnException].ToString());
|
||||
|
||||
importFromPackagePath = ImportJobDetail.JobDataMap[SettingsConstants.ImportFromPackageActionPath]?.ToString() ?? OdataActionsConstants.ImportFromPackageActionPath;
|
||||
getAzureWriteUrlPath = ImportJobDetail.JobDataMap[SettingsConstants.GetAzureWriteUrlActionPath]?.ToString() ?? OdataActionsConstants.GetAzureWriteUrlActionPath;
|
||||
importFromPackagePath = ImportJobDetail.JobDataMap[SettingsConstants.ImportFromPackageActionPath]?.ToString() ?? PackageApiActions.ImportFromPackageActionPath;
|
||||
getAzureWriteUrlPath = ImportJobDetail.JobDataMap[SettingsConstants.GetAzureWriteUrlActionPath]?.ToString() ?? PackageApiActions.GetAzureWriteUrlActionPath;
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
|
@ -289,10 +289,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
procJobCronExpressionTextBox.Text = localTrigger.CronExpressionString;
|
||||
}
|
||||
|
||||
getExecutionSummaryStatusPath = ExecutionJobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryStatusActionPath]?.ToString() ?? OdataActionsConstants.GetExecutionSummaryStatusActionPath;
|
||||
getExecutionSummaryPageUrlPath = ExecutionJobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryPageUrlActionPath]?.ToString() ?? OdataActionsConstants.GetExecutionSummaryPageUrlActionPath;
|
||||
getImportTargetErrorKeysFileUrlPath = ExecutionJobDetail.JobDataMap[SettingsConstants.GetImportTargetErrorKeysFileUrlPath]?.ToString() ?? OdataActionsConstants.GetImportTargetErrorKeysFileUrlPath;
|
||||
generateImportTargetErrorKeysFilePath = ExecutionJobDetail.JobDataMap[SettingsConstants.GenerateImportTargetErrorKeysFilePath]?.ToString() ?? OdataActionsConstants.GenerateImportTargetErrorKeysFilePath;
|
||||
getExecutionSummaryStatusPath = ExecutionJobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryStatusActionPath]?.ToString() ?? PackageApiActions.GetExecutionSummaryStatusActionPath;
|
||||
getExecutionSummaryPageUrlPath = ExecutionJobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryPageUrlActionPath]?.ToString() ?? PackageApiActions.GetExecutionSummaryPageUrlActionPath;
|
||||
getImportTargetErrorKeysFileUrlPath = ExecutionJobDetail.JobDataMap[SettingsConstants.GetImportTargetErrorKeysFileUrlPath]?.ToString() ?? PackageApiActions.GetImportTargetErrorKeysFileUrlPath;
|
||||
generateImportTargetErrorKeysFilePath = ExecutionJobDetail.JobDataMap[SettingsConstants.GenerateImportTargetErrorKeysFilePath]?.ToString() ?? PackageApiActions.GenerateImportTargetErrorKeysFilePath;
|
||||
|
||||
downloadErrorKeysFileCheckBox.Checked =
|
||||
(ExecutionJobDetail.JobDataMap[SettingsConstants.GetImportTargetErrorKeysFile] != null) &&
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -33,7 +33,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
get
|
||||
{
|
||||
var myCp = base.CreateParams;
|
||||
myCp.ClassStyle = myCp.ClassStyle | CpNocloseButton;
|
||||
myCp.ClassStyle |= CpNocloseButton;
|
||||
return myCp;
|
||||
}
|
||||
}
|
||||
|
@ -85,13 +85,13 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
processingSuccessFolderTextBox.Text = Properties.Settings.Default.ProcessingSuccessFolder;
|
||||
processingErrorsFolderTextBox.Text = Properties.Settings.Default.ProcessingErrorsFolder;
|
||||
|
||||
importFromPackageTextBox.Text = OdataActionsConstants.ImportFromPackageActionPath;
|
||||
getAzureWriteUrlTextBox.Text = OdataActionsConstants.GetAzureWriteUrlActionPath;
|
||||
getExecutionSummaryStatusTextBox.Text = OdataActionsConstants.GetExecutionSummaryStatusActionPath;
|
||||
getExecutionSummaryPageUrlTextBox.Text = OdataActionsConstants.GetExecutionSummaryPageUrlActionPath;
|
||||
getImportTargetErrorKeysFileUrlTextBox.Text = OdataActionsConstants.GetImportTargetErrorKeysFileUrlPath;
|
||||
generateImportTargetErrorKeysFileTextBox.Text = OdataActionsConstants.GenerateImportTargetErrorKeysFilePath;
|
||||
getExecutionErrorsTextBox.Text = OdataActionsConstants.GetExecutionErrorsPath;
|
||||
importFromPackageTextBox.Text = PackageApiActions.ImportFromPackageActionPath;
|
||||
getAzureWriteUrlTextBox.Text = PackageApiActions.GetAzureWriteUrlActionPath;
|
||||
getExecutionSummaryStatusTextBox.Text = PackageApiActions.GetExecutionSummaryStatusActionPath;
|
||||
getExecutionSummaryPageUrlTextBox.Text = PackageApiActions.GetExecutionSummaryPageUrlActionPath;
|
||||
getImportTargetErrorKeysFileUrlTextBox.Text = PackageApiActions.GetImportTargetErrorKeysFileUrlPath;
|
||||
generateImportTargetErrorKeysFileTextBox.Text = PackageApiActions.GenerateImportTargetErrorKeysFilePath;
|
||||
getExecutionErrorsTextBox.Text = PackageApiActions.GetExecutionErrorsPath;
|
||||
|
||||
if (ImportJobDetail != null)
|
||||
{
|
||||
|
@ -260,8 +260,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
(ImportJobDetail.JobDataMap[SettingsConstants.PauseJobOnException] != null) &&
|
||||
Convert.ToBoolean(ImportJobDetail.JobDataMap[SettingsConstants.PauseJobOnException].ToString());
|
||||
|
||||
importFromPackageTextBox.Text = ImportJobDetail.JobDataMap[SettingsConstants.ImportFromPackageActionPath]?.ToString() ?? OdataActionsConstants.ImportFromPackageActionPath;
|
||||
getAzureWriteUrlTextBox.Text = ImportJobDetail.JobDataMap[SettingsConstants.GetAzureWriteUrlActionPath]?.ToString() ?? OdataActionsConstants.GetAzureWriteUrlActionPath;
|
||||
importFromPackageTextBox.Text = ImportJobDetail.JobDataMap[SettingsConstants.ImportFromPackageActionPath]?.ToString() ?? PackageApiActions.ImportFromPackageActionPath;
|
||||
getAzureWriteUrlTextBox.Text = ImportJobDetail.JobDataMap[SettingsConstants.GetAzureWriteUrlActionPath]?.ToString() ?? PackageApiActions.GetAzureWriteUrlActionPath;
|
||||
|
||||
multicompanyCheckBox.Checked =
|
||||
(ImportJobDetail.JobDataMap[SettingsConstants.MultiCompanyImport] != null) &&
|
||||
|
@ -278,6 +278,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
legalEntityTokenPositionNumericUpDown.Value = Convert.ToDecimal(ImportJobDetail.JobDataMap[SettingsConstants.LegalEntityTokenPosition]);
|
||||
}
|
||||
|
||||
verboseLoggingCheckBox.Checked =
|
||||
(ImportJobDetail.JobDataMap[SettingsConstants.LogVerbose] != null) &&
|
||||
Convert.ToBoolean(ImportJobDetail.JobDataMap[SettingsConstants.LogVerbose].ToString());
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
if ((ExecutionJobDetail != null) && (ExecutionTrigger != null))
|
||||
|
@ -302,11 +306,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
monitoringJobCronExpressionTextBox.Text = localTrigger.CronExpressionString;
|
||||
}
|
||||
|
||||
getExecutionSummaryStatusTextBox.Text = ExecutionJobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryStatusActionPath]?.ToString() ?? OdataActionsConstants.GetExecutionSummaryStatusActionPath;
|
||||
getExecutionSummaryPageUrlTextBox.Text = ExecutionJobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryPageUrlActionPath]?.ToString() ?? OdataActionsConstants.GetExecutionSummaryPageUrlActionPath;
|
||||
getImportTargetErrorKeysFileUrlTextBox.Text = ExecutionJobDetail.JobDataMap[SettingsConstants.GetImportTargetErrorKeysFileUrlPath]?.ToString() ?? OdataActionsConstants.GetImportTargetErrorKeysFileUrlPath;
|
||||
generateImportTargetErrorKeysFileTextBox.Text = ExecutionJobDetail.JobDataMap[SettingsConstants.GenerateImportTargetErrorKeysFilePath]?.ToString() ?? OdataActionsConstants.GenerateImportTargetErrorKeysFilePath;
|
||||
getExecutionErrorsTextBox.Text = ExecutionJobDetail.JobDataMap[SettingsConstants.GetExecutionErrorsPath]?.ToString() ?? OdataActionsConstants.GetExecutionErrorsPath;
|
||||
getExecutionSummaryStatusTextBox.Text = ExecutionJobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryStatusActionPath]?.ToString() ?? PackageApiActions.GetExecutionSummaryStatusActionPath;
|
||||
getExecutionSummaryPageUrlTextBox.Text = ExecutionJobDetail.JobDataMap[SettingsConstants.GetExecutionSummaryPageUrlActionPath]?.ToString() ?? PackageApiActions.GetExecutionSummaryPageUrlActionPath;
|
||||
getImportTargetErrorKeysFileUrlTextBox.Text = ExecutionJobDetail.JobDataMap[SettingsConstants.GetImportTargetErrorKeysFileUrlPath]?.ToString() ?? PackageApiActions.GetImportTargetErrorKeysFileUrlPath;
|
||||
generateImportTargetErrorKeysFileTextBox.Text = ExecutionJobDetail.JobDataMap[SettingsConstants.GenerateImportTargetErrorKeysFilePath]?.ToString() ?? PackageApiActions.GenerateImportTargetErrorKeysFilePath;
|
||||
getExecutionErrorsTextBox.Text = ExecutionJobDetail.JobDataMap[SettingsConstants.GetExecutionErrorsPath]?.ToString() ?? PackageApiActions.GetExecutionErrorsPath;
|
||||
|
||||
downloadErrorKeysFileCheckBox.Checked =
|
||||
(ExecutionJobDetail.JobDataMap[SettingsConstants.GetImportTargetErrorKeysFile] != null) &&
|
||||
|
@ -547,7 +551,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
{SettingsConstants.GetLegalEntityFromFilename, getLegalEntityFromFilenameRadioButton.Checked.ToString()},
|
||||
{SettingsConstants.FilenameSeparator, filenameSeparatorTextBox.Text},
|
||||
{SettingsConstants.LegalEntityTokenPosition, legalEntityTokenPositionNumericUpDown.Value.ToString(CultureInfo.InvariantCulture)},
|
||||
{SettingsConstants.InputFilesArePackages, inputFilesArePackagesCheckBox.Checked.ToString()}
|
||||
{SettingsConstants.InputFilesArePackages, inputFilesArePackagesCheckBox.Checked.ToString()},
|
||||
{SettingsConstants.LogVerbose, verboseLoggingCheckBox.Checked.ToString()}
|
||||
};
|
||||
if (serviceAuthRadioButton.Checked)
|
||||
{
|
||||
|
@ -590,7 +595,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
{SettingsConstants.PackageTemplate, packageTemplateTextBox.Text},
|
||||
{SettingsConstants.DelayBetweenStatusCheck, statusCheckDelayNumericUpDown.Value.ToString(CultureInfo.InvariantCulture)},
|
||||
{SettingsConstants.GetExecutionErrors, getExecutionErrorsCheckBox.Checked.ToString()},
|
||||
{SettingsConstants.GetExecutionErrorsPath, getExecutionErrorsTextBox.Text}
|
||||
{SettingsConstants.GetExecutionErrorsPath, getExecutionErrorsTextBox.Text},
|
||||
{SettingsConstants.LogVerbose, verboseLoggingCheckBox.Checked.ToString()}
|
||||
};
|
||||
if (serviceAuthRadioButton.Checked)
|
||||
{
|
||||
|
@ -638,28 +644,23 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
topFolderBrowserButton.Enabled = true;
|
||||
|
||||
inputFolderTextBox.Enabled = false;
|
||||
inputFolderTextBox.Text = Path.Combine(topFolderTextBox.Text,
|
||||
Properties.Settings.Default.UploadInputFolder);
|
||||
inputFolderTextBox.Text = Path.Combine(topFolderTextBox.Text, Properties.Settings.Default.UploadInputFolder);
|
||||
inputFolderBrowserButton.Enabled = false;
|
||||
|
||||
uploadSuccessFolderTextBox.Enabled = false;
|
||||
uploadSuccessFolderTextBox.Text = Path.Combine(topFolderTextBox.Text,
|
||||
Properties.Settings.Default.UploadSuccessFolder);
|
||||
uploadSuccessFolderTextBox.Text = Path.Combine(topFolderTextBox.Text, Properties.Settings.Default.UploadSuccessFolder);
|
||||
uploadSuccessFolderBrowserButton.Enabled = false;
|
||||
|
||||
uploadErrorsFolderTextBox.Enabled = false;
|
||||
uploadErrorsFolderTextBox.Text = Path.Combine(topFolderTextBox.Text,
|
||||
Properties.Settings.Default.UploadErrorsFolder);
|
||||
uploadErrorsFolderTextBox.Text = Path.Combine(topFolderTextBox.Text, Properties.Settings.Default.UploadErrorsFolder);
|
||||
uploadErrorsFolderBrowserButton.Enabled = false;
|
||||
|
||||
processingSuccessFolderTextBox.Enabled = false;
|
||||
processingSuccessFolderTextBox.Text = Path.Combine(topFolderTextBox.Text,
|
||||
Properties.Settings.Default.ProcessingSuccessFolder);
|
||||
processingSuccessFolderTextBox.Text = Path.Combine(topFolderTextBox.Text, Properties.Settings.Default.ProcessingSuccessFolder);
|
||||
processingSuccessFolderBrowserButton.Enabled = false;
|
||||
|
||||
processingErrorsFolderTextBox.Enabled = false;
|
||||
processingErrorsFolderTextBox.Text = Path.Combine(topFolderTextBox.Text,
|
||||
Properties.Settings.Default.ProcessingErrorsFolder);
|
||||
processingErrorsFolderTextBox.Text = Path.Combine(topFolderTextBox.Text, Properties.Settings.Default.ProcessingErrorsFolder);
|
||||
processingErrorsFolderBrowserButton.Enabled = false;
|
||||
}
|
||||
else
|
||||
|
@ -684,11 +685,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
|
||||
if (string.IsNullOrEmpty(topFolderTextBox.Text))
|
||||
{
|
||||
inputFolderTextBox.Text = "";
|
||||
uploadSuccessFolderTextBox.Text = "";
|
||||
uploadErrorsFolderTextBox.Text = "";
|
||||
processingSuccessFolderTextBox.Text = "";
|
||||
processingErrorsFolderTextBox.Text = "";
|
||||
inputFolderTextBox.Text = string.Empty;
|
||||
uploadSuccessFolderTextBox.Text = string.Empty;
|
||||
uploadErrorsFolderTextBox.Text = string.Empty;
|
||||
processingSuccessFolderTextBox.Text = string.Empty;
|
||||
processingErrorsFolderTextBox.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -739,16 +740,11 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
{
|
||||
if (useStandardSubfolder.Checked)
|
||||
{
|
||||
inputFolderTextBox.Text = Path.Combine(topFolderTextBox.Text,
|
||||
Properties.Settings.Default.UploadInputFolder);
|
||||
uploadSuccessFolderTextBox.Text = Path.Combine(topFolderTextBox.Text,
|
||||
Properties.Settings.Default.UploadSuccessFolder);
|
||||
uploadErrorsFolderTextBox.Text = Path.Combine(topFolderTextBox.Text,
|
||||
Properties.Settings.Default.UploadErrorsFolder);
|
||||
processingSuccessFolderTextBox.Text = Path.Combine(topFolderTextBox.Text,
|
||||
Properties.Settings.Default.ProcessingSuccessFolder);
|
||||
processingErrorsFolderTextBox.Text = Path.Combine(topFolderTextBox.Text,
|
||||
Properties.Settings.Default.ProcessingErrorsFolder);
|
||||
inputFolderTextBox.Text = Path.Combine(topFolderTextBox.Text, Properties.Settings.Default.UploadInputFolder);
|
||||
uploadSuccessFolderTextBox.Text = Path.Combine(topFolderTextBox.Text, Properties.Settings.Default.UploadSuccessFolder);
|
||||
uploadErrorsFolderTextBox.Text = Path.Combine(topFolderTextBox.Text, Properties.Settings.Default.UploadErrorsFolder);
|
||||
processingSuccessFolderTextBox.Text = Path.Combine(topFolderTextBox.Text, Properties.Settings.Default.ProcessingSuccessFolder);
|
||||
processingErrorsFolderTextBox.Text = Path.Combine(topFolderTextBox.Text, Properties.Settings.Default.ProcessingErrorsFolder);
|
||||
openFileDialog.InitialDirectory = topFolderTextBox.Text;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -137,7 +137,7 @@ Default example above means: Each working day of the week (MON-FRI) run every 15
|
|||
<data name="cancelToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YQUAAAAJcEhZcwAAGdYAABnWARjRyu0AAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
|
@ -152,7 +152,7 @@ Default example above means: Each working day of the week (MON-FRI) run every 15
|
|||
<data name="addToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YQUAAAAJcEhZcwAAGdYAABnWARjRyu0AAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
|
|
|
@ -225,11 +225,13 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
{
|
||||
try
|
||||
{
|
||||
using FileDialog dialog = new SaveFileDialog();
|
||||
dialog.Filter = Resources.Recurring_Integrations_Schedule_xml;
|
||||
dialog.FileName = "Schedule";
|
||||
dialog.DefaultExt = "xml";
|
||||
dialog.AddExtension = true;
|
||||
using FileDialog dialog = new SaveFileDialog
|
||||
{
|
||||
Filter = Resources.Recurring_Integrations_Schedule_xml,
|
||||
FileName = "Schedule",
|
||||
DefaultExt = "xml",
|
||||
AddExtension = true
|
||||
};
|
||||
|
||||
var defaultPath = Path.Combine(
|
||||
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
|
||||
|
@ -381,7 +383,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
case SettingsConstants.ExportJob:
|
||||
if (Properties.Settings.Default.V3Forms)
|
||||
{
|
||||
using ExportJob exportForm = new ExportJob
|
||||
using ExportJobV3 exportForm = new ExportJobV3
|
||||
{
|
||||
JobDetail = jobDetail,
|
||||
Trigger = jobTrigger
|
||||
|
@ -397,7 +399,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
}
|
||||
else
|
||||
{
|
||||
using ExportJobV3 exportForm = new ExportJobV3
|
||||
using ExportJob exportForm = new ExportJob
|
||||
{
|
||||
JobDetail = jobDetail,
|
||||
Trigger = jobTrigger
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -32,7 +32,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
get
|
||||
{
|
||||
var myCp = base.CreateParams;
|
||||
myCp.ClassStyle = myCp.ClassStyle | CpNocloseButton;
|
||||
myCp.ClassStyle |= CpNocloseButton;
|
||||
return myCp;
|
||||
}
|
||||
}
|
||||
|
@ -263,6 +263,10 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
(UploadJobDetail.JobDataMap[SettingsConstants.PauseJobOnException] != null) &&
|
||||
Convert.ToBoolean(UploadJobDetail.JobDataMap[SettingsConstants.PauseJobOnException].ToString());
|
||||
|
||||
verboseLoggingCheckBox.Checked =
|
||||
(UploadJobDetail.JobDataMap[SettingsConstants.LogVerbose] != null) &&
|
||||
Convert.ToBoolean(UploadJobDetail.JobDataMap[SettingsConstants.LogVerbose].ToString());
|
||||
|
||||
Properties.Settings.Default.Save();
|
||||
}
|
||||
if ((ProcessingJobDetail != null) && (ProcessingTrigger != null))
|
||||
|
@ -491,7 +495,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
if (procJobSimpleTriggerRadioButton.Checked)
|
||||
{
|
||||
var minutes = procJobHoursDateTimePicker.Value.Hour*60;
|
||||
minutes = minutes + procJobMinutesDateTimePicker.Value.Minute;
|
||||
minutes += procJobMinutesDateTimePicker.Value.Minute;
|
||||
|
||||
return builder.WithSimpleSchedule(x => x
|
||||
.WithIntervalInMinutes(minutes)
|
||||
|
@ -565,7 +569,8 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
{SettingsConstants.RetryDelay, retriesDelayUpDown.Value.ToString(CultureInfo.InvariantCulture)},
|
||||
{SettingsConstants.PauseJobOnException, pauseOnExceptionsCheckBox.Checked.ToString()},
|
||||
{SettingsConstants.IndefinitePause, pauseIndefinitelyCheckBox.Checked.ToString()},
|
||||
{SettingsConstants.DelayBetweenFiles, numericUpDownIntervalUploads.Value.ToString(CultureInfo.InvariantCulture)}
|
||||
{SettingsConstants.DelayBetweenFiles, numericUpDownIntervalUploads.Value.ToString(CultureInfo.InvariantCulture)},
|
||||
{SettingsConstants.LogVerbose, verboseLoggingCheckBox.Checked.ToString()}
|
||||
};
|
||||
if (serviceAuthRadioButton.Checked)
|
||||
{
|
||||
|
@ -604,6 +609,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
{SettingsConstants.IndefinitePause, pauseIndefinitelyCheckBox.Checked.ToString()},
|
||||
{SettingsConstants.DelayBetweenStatusCheck, delayBetweenStatusCheckNumericUpDown.Value.ToString(CultureInfo.InvariantCulture)},
|
||||
{SettingsConstants.GetExecutionErrors, getExecutionErrorsCheckBox.Checked.ToString()},
|
||||
{SettingsConstants.LogVerbose, verboseLoggingCheckBox.Checked.ToString()}
|
||||
};
|
||||
if (serviceAuthRadioButton.Checked)
|
||||
{
|
||||
|
|
|
@ -137,7 +137,7 @@ Default example above means: Each working day of the week (MON-FRI) run every 15
|
|||
<data name="cancelToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YQUAAAAJcEhZcwAAGdYAABnWARjRyu0AAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
|
@ -152,7 +152,7 @@ Default example above means: Each working day of the week (MON-FRI) run every 15
|
|||
<data name="addToolStripButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YQUAAAAJcEhZcwAAGdYAABnWARjRyu0AAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
/* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
Licensed under the MIT License. */
|
||||
|
||||
using Polly;
|
||||
using RecurringIntegrationsScheduler.Common.Helpers;
|
||||
using RecurringIntegrationsScheduler.Properties;
|
||||
using RecurringIntegrationsScheduler.Settings;
|
||||
|
@ -9,7 +8,6 @@ using System;
|
|||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
@ -84,8 +82,7 @@ namespace RecurringIntegrationsScheduler.Forms
|
|||
}
|
||||
settings.UseServiceAuthentication = serviceAuthRadioButton.Checked;
|
||||
|
||||
var retryPolicy = Policy.Handle<HttpRequestException>().RetryAsync(retryCount: 1);
|
||||
var httpClientHelper = new HttpClientHelper(settings, retryPolicy);
|
||||
var httpClientHelper = new HttpClientHelper(settings);
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
// This file is used by Code Analysis to maintain SuppressMessage
|
||||
// attributes that are applied to this project.
|
||||
// Project-level suppressions either have no target or are given
|
||||
// a specific target and scoped to a namespace, type, member, etc.
|
||||
|
||||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1031:Do not catch general exception types", Justification = "<Pending>", Scope = "member", Target = "~M:RecurringIntegrationsScheduler.Forms.UploadJobV3.GetScheduleForCron(System.String,System.DateTimeOffset)~System.Nullable{System.DateTimeOffset}")]
|
|
@ -214,6 +214,7 @@
|
|||
<Compile Include="Forms\ValidateConnection.Designer.cs">
|
||||
<DependentUpon>ValidateConnection.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GlobalSuppressions.cs" />
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
Licensed under the MIT License. */
|
||||
|
||||
using System.Reflection;
|
||||
[assembly: AssemblyVersion("3.0.0.0")]
|
||||
[assembly: AssemblyVersion("3.1.0.0")]
|
Загрузка…
Ссылка в новой задаче