Added error message when input file cannot be identified in Manifest file of package template.
This commit is contained in:
Родитель
9dbd73b68b
Коммит
8f26f2c51d
|
@ -192,9 +192,13 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
FileStream zipToOpen = null;
|
||||
ZipArchive archive = null;
|
||||
|
||||
if (!String.IsNullOrEmpty(_settings.PackageTemplate))
|
||||
if (!string.IsNullOrEmpty(_settings.PackageTemplate))
|
||||
{
|
||||
fileNameInPackage = GetFileNameInPackage();
|
||||
if (!string.IsNullOrEmpty(fileNameInPackage))
|
||||
{
|
||||
throw new Exception(string.Format(Resources.Job_0_Please_check_your_package_template_Input_file_name_in_Manifest_cannot_be_identified, _context.JobDetail.Key));
|
||||
}
|
||||
}
|
||||
|
||||
while (InputQueue.TryDequeue(out DataMessage dataMessage))
|
||||
|
@ -228,7 +232,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
if (entry != null)
|
||||
{
|
||||
entry.Delete();
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Package_template_contains_input_file_0_Please_remove_it_from_the_template, fileNameInPackage));
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Package_template_contains_input_file_1_Please_remove_it_from_the_template, _context.JobDetail.Key, fileNameInPackage));
|
||||
}
|
||||
|
||||
// Update Manifest file with the original file name for end-to-end traceability. Use the new file name in the rest of the method.
|
||||
|
@ -435,7 +439,7 @@ namespace RecurringIntegrationsScheduler.Job
|
|||
if (entry != null)
|
||||
{
|
||||
entry.Delete();
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Package_template_contains_input_file_0_Please_remove_it_from_the_template, fileNameInPackage));
|
||||
Log.WarnFormat(CultureInfo.InvariantCulture, string.Format(Resources.Job_0_Package_template_contains_input_file_1_Please_remove_it_from_the_template, fileNameInPackage));
|
||||
}
|
||||
|
||||
return fileNameInPackage;
|
||||
|
|
|
@ -141,6 +141,25 @@ namespace RecurringIntegrationsScheduler.Job.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Job: {0} Package template contains input file: {1}. Please remove it from the template..
|
||||
/// </summary>
|
||||
internal static string Job_0_Package_template_contains_input_file_1_Please_remove_it_from_the_template {
|
||||
get {
|
||||
return ResourceManager.GetString("Job_0_Package_template_contains_input_file_1_Please_remove_it_from_the_template", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Job: {0} Please check your package template. Input file name in Manifest cannot be identified..
|
||||
/// </summary>
|
||||
internal static string Job_0_Please_check_your_package_template_Input_file_name_in_Manifest_cannot_be_identified {
|
||||
get {
|
||||
return ResourceManager.GetString("Job_0_Please_check_your_package_template_Input_file_name_in_Manifest_cannot_be_id" +
|
||||
"entified", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Job: {0}. Retrying HTTP operation. Exception : {1}.
|
||||
/// </summary>
|
||||
|
@ -221,14 +240,5 @@ namespace RecurringIntegrationsScheduler.Job.Properties {
|
|||
return ResourceManager.GetString("Job_0_was_paused_indefinitely", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Package template contains input file: {0}. Please remove it from the template..
|
||||
/// </summary>
|
||||
internal static string Package_template_contains_input_file_0_Please_remove_it_from_the_template {
|
||||
get {
|
||||
return ResourceManager.GetString("Package_template_contains_input_file_0_Please_remove_it_from_the_template", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,8 +159,8 @@
|
|||
<data name="Delay_upload_of_next_file_for_0_seconds" xml:space="preserve">
|
||||
<value>Delay upload of next file for {0} seconds</value>
|
||||
</data>
|
||||
<data name="Package_template_contains_input_file_0_Please_remove_it_from_the_template" xml:space="preserve">
|
||||
<value>Package template contains input file: {0}. Please remove it from the template.</value>
|
||||
<data name="Job_0_Package_template_contains_input_file_1_Please_remove_it_from_the_template" xml:space="preserve">
|
||||
<value>Job: {0} Package template contains input file: {1}. Please remove it from the template.</value>
|
||||
</data>
|
||||
<data name="Job_0_Retrying_Http_operation_Exception_1" xml:space="preserve">
|
||||
<value>Job: {0}. Retrying HTTP operation. Exception : {1}</value>
|
||||
|
@ -174,4 +174,7 @@
|
|||
<data name="Job_0_was_paused_indefinitely" xml:space="preserve">
|
||||
<value>Job: {0} was paused indefinitely.</value>
|
||||
</data>
|
||||
<data name="Job_0_Please_check_your_package_template_Input_file_name_in_Manifest_cannot_be_identified" xml:space="preserve">
|
||||
<value>Job: {0} Please check your package template. Input file name in Manifest cannot be identified.</value>
|
||||
</data>
|
||||
</root>
|
Загрузка…
Ссылка в новой задаче