Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c0b77cf
- Begin EFCore migration
x64-dev Jan 25, 2026
e2e30d5
Merge main into efcore
x64-dev Mar 4, 2026
7fb87ae
JSON formatting fix
x64-dev Mar 4, 2026
aecc3f4
Migrated daily stats to EFcore
x64-dev Mar 4, 2026
0e7293c
- Cleanup model creation
x64-dev Mar 4, 2026
e2a7096
- Migrated lobbymanager away from static class to DI'd singleton
x64-dev Mar 4, 2026
179e19a
Cleanup of User
x64-dev Mar 4, 2026
daa698e
Moved IsUserAdmin and IsUserBanned to EFCore
x64-dev Mar 4, 2026
77b25a0
Migrated more of User to efcore
x64-dev Mar 4, 2026
45f13dc
Moved user lobby prefs to efcore
x64-dev Mar 4, 2026
4d76d3e
Reworked sessions, shared data and websockets to allow for multiple i…
x64-dev Mar 6, 2026
1a61df1
- OID endpoint now returns roles and client id associated with the token
x64-dev Mar 6, 2026
783be83
Fix bug with parsing of known client ID
x64-dev Mar 7, 2026
eb17ef5
Update endpoint permissions to match new token roles
x64-dev Mar 7, 2026
ccbd131
Only allow Gameclient tokens to utilize UpdateSessionLobbyID
x64-dev Mar 7, 2026
3ccb179
Added known client: "superhackers_community_patch_client"
x64-dev Mar 7, 2026
c559a9f
Assigned known client 'superhackers_community_patch_client' role 'Gam…
x64-dev Mar 7, 2026
b34a03e
Added a known client "custom_third_party_client" for people to build …
x64-dev Mar 7, 2026
923867f
- Added priorities for presence now that one user can sign in on mult…
x64-dev Mar 7, 2026
05f0703
- Dedupe user list on /ActiveUsers endpoint
x64-dev Mar 7, 2026
b61f3f3
- Migrated more of DB to EFCore
x64-dev Mar 7, 2026
0582950
More raw SQL -> EFCore migration
x64-dev Mar 7, 2026
b0fbc15
- Migrated more to EFCore + some optimizations
x64-dev Mar 7, 2026
9ebf9d0
Bug fixes + converted bulk display name func to efcore
x64-dev Mar 8, 2026
3767c10
- Migrate away from DI'ed db contexts to db factories for speed + thr…
x64-dev Mar 8, 2026
4ab057e
- Start migration of matchhistory to efcore
x64-dev Mar 8, 2026
f7cbba0
Matchhistory file
x64-dev Mar 8, 2026
e849635
More match history progress
x64-dev Mar 8, 2026
d6a0ab3
Last parts of match history
x64-dev Mar 8, 2026
646344f
User stats ported
x64-dev Mar 8, 2026
b3875b5
Social migration
x64-dev Mar 8, 2026
bddb7af
Legacy sql implementation fully removed
x64-dev Mar 8, 2026
2884b44
Cleaner db init
x64-dev Mar 8, 2026
d1dad5b
Release build fixes
x64-dev Mar 8, 2026
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
11 changes: 7 additions & 4 deletions GenOnlineService/BackgroundS3Uploader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using Amazon.S3;
using Amazon.S3.Model;
using GenOnlineService;
using Microsoft.EntityFrameworkCore;
using MySqlX.XDevAPI.Common;
using Sentry.Protocol;
using System.Collections.Concurrent;
using System.Net;
using static Database.Functions.Lobby;

public enum ES3UploadType
{
Expand Down Expand Up @@ -100,7 +100,7 @@ private static async Task DoUpload(S3QueuedUploadEntry entry)

string strPerMatchUserIDKey = Helpers.ComputeMD5Hash(String.Format("{0}_{1}", entry.m_MatchID, entry.m_UserID)); ;
string strFileName = null;
Database.Functions.Lobby.EMetadataFileType fileType = EMetadataFileType.UNKNOWN;
EMetadataFileType fileType = EMetadataFileType.UNKNOWN;


if (entry.m_uploadType == ES3UploadType.Screenshot)
Expand Down Expand Up @@ -188,8 +188,11 @@ private static async Task DoUpload(S3QueuedUploadEntry entry)
var response = await client.PutObjectAsync(putRequest);
Console.WriteLine($"SCREENSHOT uploaded successfully. {entry.m_FileData.Count} bytes. HHTTP Status Code: {response.HttpStatusCode}");

// store in DB
await Database.Functions.Lobby.AttachMatchHistoryMetadata(GlobalDatabaseInstance.g_Database, entry.m_MatchID, entry.m_slotIndexInLobby, strFileName, fileType);
// store in DB
using var scope = ServiceLocator.Services.CreateScope();
var factory = scope.ServiceProvider.GetRequiredService<IDbContextFactory<AppDbContext>>();
await using var db = await factory.CreateDbContextAsync();
await Database.MatchHistory.AttachMatchHistoryMetadata(db, entry.m_MatchID, entry.m_slotIndexInLobby, strFileName, fileType);
}
catch (Exception ex)
{
Expand Down
Loading