-
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed auto-retry as per this forum post: https://discuss.hangfire.io/t/recurring-jobs-do-not-automatically-get-retried-after-application-crash-net-core-service/9160 * MongoDB can't handle documents greater than 16MB * Treat messages from one id as a group * Kill failing messages over 4 days old
- Loading branch information
1 parent
db1f173
commit 3e19b1d
Showing
19 changed files
with
513 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
namespace SIL.Machine.AspNetCore.Models; | ||
|
||
public enum OutboxMessageMethod | ||
{ | ||
BuildStarted, | ||
BuildCompleted, | ||
BuildCanceled, | ||
BuildFaulted, | ||
BuildRestarting, | ||
InsertPretranslations, | ||
IncrementTranslationEngineCorpusSize | ||
} | ||
|
||
public record OutboxMessage : IEntity | ||
{ | ||
public string Id { get; set; } = ""; | ||
public int Revision { get; set; } = 1; | ||
public required OutboxMessageMethod Method { get; set; } | ||
public required string GroupId { get; set; } | ||
public required string? RequestContent { get; set; } | ||
public DateTimeOffset Created { get; set; } = DateTimeOffset.UtcNow; | ||
public int Attempts { get; set; } = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/SIL.Machine.AspNetCore/Services/IMessageOutboxService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace SIL.Machine.AspNetCore.Services; | ||
|
||
public interface IMessageOutboxService | ||
{ | ||
public Task EnqueueMessageAsync( | ||
OutboxMessageMethod method, | ||
string groupId, | ||
string requestContent, | ||
CancellationToken cancellationToken | ||
); | ||
} |
Oops, something went wrong.