Skip to content

Commit 44673ec

Browse files
authored
Remove VRC Status Proxy (#10)
1 parent 05d6307 commit 44673ec

4 files changed

Lines changed: 1 addition & 214 deletions

File tree

VRCX-API/Controllers/StatusController.cs

Lines changed: 0 additions & 68 deletions
This file was deleted.

VRCX-API/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ public static void Main(string[] args)
2424

2525
builder.Services.AddSingleton<CloudflareService>();
2626
builder.Services.AddSingleton<GithubCacheService>();
27-
builder.Services.AddSingleton<VrChatStatusCacheService>();
2827
builder.Services.AddSingleton<CachePeriodicService>();
2928
builder.Services.AddHostedService(provider => provider.GetRequiredService<CloudflareService>());
3029
builder.Services.AddHostedService(provider => provider.GetRequiredService<CachePeriodicService>());

VRCX-API/Services/CachePeriodicService.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,21 @@ public class CachePeriodicService : BackgroundService
99
private readonly ILogger<CachePeriodicService> _logger;
1010
private readonly CloudflareService _cloudflareService;
1111
private readonly GithubCacheService _githubCacheService;
12-
private readonly VrChatStatusCacheService _vrChatStatusCacheService;
1312

1413
private DateTime _githubLastRefresh = DateTime.MinValue;
15-
private DateTime _vrChatStatusLastRefresh = DateTime.MinValue;
1614

17-
public CachePeriodicService(ILogger<CachePeriodicService> logger, CloudflareService cloudflareService, GithubCacheService githubCacheService, VrChatStatusCacheService vrChatStatusCacheService)
15+
public CachePeriodicService(ILogger<CachePeriodicService> logger, CloudflareService cloudflareService, GithubCacheService githubCacheService)
1816
{
1917
_logger = logger;
2018
_cloudflareService = cloudflareService;
2119
_githubCacheService = githubCacheService;
22-
_vrChatStatusCacheService = vrChatStatusCacheService;
2320
}
2421

2522
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
2623
{
2724
await _githubCacheService.RefreshAsync();
2825
_githubLastRefresh = DateTime.Now;
2926

30-
await _vrChatStatusCacheService.RefreshAsync();
31-
_vrChatStatusLastRefresh = DateTime.Now;
32-
3327
await _cloudflareService.PurgeCache();
3428
TriggerGC();
3529

@@ -48,17 +42,6 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
4842
_githubLastRefresh = DateTime.Now;
4943
}
5044

51-
if (DateTime.Now - _vrChatStatusLastRefresh > TimeSpan.FromSeconds(VrChatStatusRefreshInterval))
52-
{
53-
hasSomethingRefreshed |= true;
54-
55-
// We will not be caching the status.
56-
// hasSomethingChanged |= await _vrChatStatusCacheService.RefreshAsync();
57-
await _vrChatStatusCacheService.RefreshAsync();
58-
59-
_vrChatStatusLastRefresh = DateTime.Now;
60-
}
61-
6245
if (hasSomethingChanged)
6346
{
6447
await _cloudflareService.PurgeCache();

VRCX-API/Services/VrChatStatusCacheService.cs

Lines changed: 0 additions & 127 deletions
This file was deleted.

0 commit comments

Comments
 (0)