Fix reminding for livetradingbot
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using Orleans;
|
||||
|
||||
namespace Managing.Application.Abstractions.Grains;
|
||||
|
||||
/// <summary>
|
||||
/// Grain responsible for initializing bot reminders on application startup.
|
||||
/// This grain ensures that only one instance runs the initialization process
|
||||
/// even in multi-silo environments.
|
||||
/// </summary>
|
||||
public interface IBotReminderInitializerGrain : IGrainWithIntegerKey
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes bot reminders by fetching all running bots and pinging them
|
||||
/// to ensure their reminders are properly registered.
|
||||
/// </summary>
|
||||
Task InitializeBotRemindersAsync();
|
||||
}
|
||||
@@ -39,4 +39,11 @@ public interface ILiveTradingBotGrain : IGrainWithGuidKey
|
||||
/// Deletes the bot and cleans up all associated resources
|
||||
/// </summary>
|
||||
Task DeleteAsync();
|
||||
|
||||
/// <summary>
|
||||
/// Pings the bot to reactivate it and ensure reminders are registered
|
||||
/// Used during startup to reactivate bots that may have lost their reminders
|
||||
/// Returns true if the ping was successful, false otherwise
|
||||
/// </summary>
|
||||
Task<bool> PingAsync();
|
||||
}
|
||||
Reference in New Issue
Block a user