Skip to content

Commit

Permalink
v3.13.3 (#361)
Browse files Browse the repository at this point in the history
* Fix a bug with the flag that allows games to be shown on the homepage while in practice mode.

* Minor cleanup

* Don't allow the challenge sync service to clean up challenges for sessions which have no player end time.
  • Loading branch information
sei-bstein authored Jan 27, 2024
1 parent a283de9 commit 4d25018
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public async Task SyncExpired(CancellationToken cancellationToken)
// Just load them all, then sync one by one.
var challenges = await _store
.WithNoTracking<Data.Challenge>()
.Where(c => c.Player.SessionEnd < now && (c.LastSyncTime < c.Player.SessionEnd || c.EndTime == DateTimeOffset.MinValue))
.Where(c => c.Player.SessionEnd != DateTimeOffset.MinValue && c.Player.SessionEnd < now && (c.LastSyncTime < c.Player.SessionEnd || c.EndTime == DateTimeOffset.MinValue))
.ToArrayAsync(cancellationToken);

var playerIds = challenges.Select(c => c.PlayerId).Distinct().ToArray();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Threading.Tasks;
using Gameboard.Api.Common.Services;
using Gameboard.Api.Features.Games.Start;
using Gameboard.Api.Structure;
using Gameboard.Api.Structure.MediatR;
using Gameboard.Api.Structure.MediatR.Authorizers;
using Gameboard.Api.Structure.MediatR.Validators;
Expand Down
3 changes: 0 additions & 3 deletions src/Gameboard.Api/Features/Game/GameStart/GameStartService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public interface IGameStartService
internal class GameStartService : IGameStartService
{
private readonly IActingUserService _actingUserService;
// private readonly IExternalSyncGameStartService _externalSyncGameStartService;
private readonly IGameModeServiceFactory _gameModeServiceFactory;
private readonly ILockService _lockService;
private readonly ILogger<GameStartService> _logger;
Expand All @@ -35,7 +34,6 @@ internal class GameStartService : IGameStartService
public GameStartService
(
IActingUserService actingUserService,
// IExternalSyncGameStartService externalSyncGameStartService,
IGameModeServiceFactory gameModeServiceFactory,
ILockService lockService,
ILogger<GameStartService> logger,
Expand All @@ -46,7 +44,6 @@ ITeamService teamService
)
{
_actingUserService = actingUserService;
// _externalSyncGameStartService = externalSyncGameStartService;
_gameModeServiceFactory = gameModeServiceFactory;
_lockService = lockService;
_logger = logger;
Expand Down

0 comments on commit 4d25018

Please sign in to comment.