Skip to content

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 ^^

@mxritzdev
Copy link
Member Author

closed due to not needed anymore

@mxritzdev mxritzdev closed this May 14, 2025
@mxritzdev mxritzdev deleted the v2_addImageUpdate branch May 16, 2025 09:24
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.

3 participants