Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix white spaces #212

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion WiserTaskScheduler/AutoUpdater/Models/SlackSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class SlackSettings
/// <summary>
/// Gets or sets the name of the SlackChannel.
/// </summary>
public string Channel { get; set; }
public string Channel { get; set; }

/// <summary>
/// Gets or sets the token of the bot that is being used.
Expand Down
16 changes: 8 additions & 8 deletions WiserTaskScheduler/AutoUpdater/Services/UpdateService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class UpdateService : IUpdateService

private Version lastDownloadedVersion;

public UpdateService(IOptions<UpdateSettings> updateSettings, ILogger<UpdateService> logger,ISlackChatService slackChatService, IServiceProvider serviceProvider)
public UpdateService(IOptions<UpdateSettings> updateSettings, ILogger<UpdateService> logger, ISlackChatService slackChatService, IServiceProvider serviceProvider)
{
this.updateSettings = updateSettings.Value;
this.logger = logger;
Expand Down Expand Up @@ -153,7 +153,7 @@ private void UpdateWts(WtsModel wts, List<VersionModel> versionList)
var message= $"Could not update WTS '{wts.ServiceName}' to version {versionList[0].Version} due to breaking changes since the current version of the WTS ({version}).{Environment.NewLine}Please check the release logs and resolve the breaking changes before manually updating the WTS.";

logger.LogWarning(message);
InformPeople(wts,subject,message);
InformPeople(wts, subject, message);
return;
case UpdateStates.Update:
// If the update time is in the future wait until the update time.
Expand Down Expand Up @@ -237,7 +237,7 @@ private void PerformUpdate(WtsModel wts, Version currentVersion, Version version
var subject = "WTS Auto Updater - WTS not found";
var message= $"The service for WTS '{wts.ServiceName}' could not be found on the server and can therefore not be updated.";

InformPeople(wts,subject,message);
InformPeople(wts, subject, message);

logger.LogWarning($"No service found for '{wts.ServiceName}'.");
return;
Expand Down Expand Up @@ -283,7 +283,7 @@ private void PerformUpdate(WtsModel wts, Version currentVersion, Version version

if (wts.SendEmailOnUpdateComplete)
{
InformPeople(wts,subject,message);
InformPeople(wts, subject, message);
}
}
catch (Exception e)
Expand All @@ -293,7 +293,7 @@ private void PerformUpdate(WtsModel wts, Version currentVersion, Version version

logger.LogError($"Exception occured while updating WTS '{wts.ServiceName}'.{Environment.NewLine}{Environment.NewLine}{e}");

InformPeople(wts,subject,message);
InformPeople(wts, subject, message);
}
}

Expand Down Expand Up @@ -374,15 +374,15 @@ private void RevertUpdate(WtsModel wts, ServiceController serviceController, Ver
var message= $"Failed to update WTS '{wts.ServiceName}' to version {versionToUpdateTo}, successfully restored to version {currentVersion}.<br/><br/>Error when updating:<br/>{updateException}";

logger.LogError(message);
InformPeople(wts,subject,message);
InformPeople(wts, subject, message);
}
catch (InvalidOperationException revertException)
{
var subject = "WTS Auto Updater - Updating and reverting failed!";
var message= $"Failed to update WTS '{wts.ServiceName}' to version {versionToUpdateTo}, failed to restore version {currentVersion}.{Environment.NewLine}{Environment.NewLine}Error when reverting:{Environment.NewLine}{revertException}{Environment.NewLine}{Environment.NewLine}Error when updating:{Environment.NewLine}{updateException}";

logger.LogError(message);
InformPeople(wts,subject,message);
InformPeople(wts, subject, message);
}
}

Expand All @@ -391,7 +391,7 @@ private void InformPeople(WtsModel wts, string subject, string message, bool sen
if (sendEmail)
{
var emailMessage = message.Replace(Environment.NewLine, "<br/>");
EmailAdministrator(wts.ContactEmail,subject,emailMessage,wts.ServiceName);
EmailAdministrator(wts.ContactEmail, subject,emailMessage, wts.ServiceName);
}

if (sendSlack)
Expand Down