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

Repair deferred updates and other cleanup #554

Merged
merged 7 commits into from
Jul 22, 2022
Merged

Conversation

dovholuknf
Copy link
Member

@dovholuknf dovholuknf commented Jul 22, 2022

closes #541
closes #474
closes #396

@dovholuknf dovholuknf requested a review from a team as a code owner July 22, 2022 20:10
@@ -835,9 +835,18 @@ public partial class MainWindow : Window {
if ("installationupdate".Equals(evt.Message?.ToLower())) {
logger.Debug("Installation Update is available - {0}", evt.ZDEVersion);
IsUpdateAvailable = true;
MainMenu.ShowUpdateAvailable(evt.TimeRemaining, evt.InstallTime);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

was TimeRemaining bogus? or does it mean something else? should it be removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was utterly superfluous and i removed it from the json object the montior service sends, yes. It was replaced by a simple "now - installtime" calculation (which is already there):

var remaining = evt.InstallTime - DateTime.Now;
...
MainMenu.ShowUpdateAvailable(remaining.TotalSeconds, evt.InstallTime);

if ((""+level).ToLower() == "verbose")
{
level = "trace";
Logger.Info("request to change log level to verbose - but using trace instead");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not respect "verbose" ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NLog doesn't have the level

public String ZDEVersion { get; set; }
public DateTime CreationDate { get; set; }
public string ZDEVersion { get; set; }
/*public DateTime CreationDate { get; set; }
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll just delete this dead code - this is where TimeRemaining was

This duration probably should not be smaller than the UpdateTimer. If a value is provided that is smaller than the UpdateTimer.
If the value is smaller than the UpdateTimer duration, it will nag the user every time the update check detects a new udpate.

It is recommended to keep this value some multiplier of the UpdateTimer.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/multiplier/multiple/ ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure

@dovholuknf dovholuknf merged commit a965c27 into release-next Jul 22, 2022
@dovholuknf dovholuknf deleted the zdew-improvements branch July 22, 2022 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants