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

V2 add image update #424

Open
wants to merge 6 commits into
base: v2
Choose a base branch
from
Open

V2 add image update #424

wants to merge 6 commits into from

Conversation

mxritzdev
Copy link
Member

The Update Feature is doing:

  • Updating Information (Name, Author, Startupcmd, ...)
  • Updating Variables and docker images (removing unused, updating existent, saving new)

Copy link
Member

@Masu-Baumgartner Masu-Baumgartner left a comment

Choose a reason for hiding this comment

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

No need to put the HttpClient as a scoped service. Just create an instance and dispose it with the using expression.

using var httpClient = new HttpClient();

@Masu-Baumgartner
Copy link
Member

And use FirstOrDefault instead of Any + FindIndex. This reduces the db calls. If the item is missing the return value would be null

@mxritzdev
Copy link
Member Author

The FindIndex and Any are called on a local list instead of the db

@mxritzdev
Copy link
Member Author

So it would not really make a difference

@Masu-Baumgartner
Copy link
Member

Another thing is that all server using the image need to have their variables updated too as they would stop working if the image varaibles get updated

@mxritzdev
Copy link
Member Author

Oh, i didnt thought about that, i will do that later/tomorrow

@Masu-Baumgartner
Copy link
Member

Oki. Thx for the help with moonlight. Take your time ^^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants