From 6d1f1b75545c0bc04f6b1797c390f628dd2cc8d9 Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Fri, 6 Dec 2024 09:49:34 -0600 Subject: [PATCH] fix util-crontab name --- .../BotSharp.Core.Crontab/Functions/ScheduleTaskFn.cs | 3 ++- .../BotSharp.Core.Crontab/Hooks/CrontabUtilityHook.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core.Crontab/Functions/ScheduleTaskFn.cs b/src/Infrastructure/BotSharp.Core.Crontab/Functions/ScheduleTaskFn.cs index cb4986b0..70d3b410 100644 --- a/src/Infrastructure/BotSharp.Core.Crontab/Functions/ScheduleTaskFn.cs +++ b/src/Infrastructure/BotSharp.Core.Crontab/Functions/ScheduleTaskFn.cs @@ -1,11 +1,12 @@ using BotSharp.Abstraction.Routing; using BotSharp.Abstraction.Users; +using BotSharp.Core.Crontab.Hooks; namespace BotSharp.Core.Crontab.Functions; public class ScheduleTaskFn : IFunctionCallback { - public string Name => "schedule_task"; + public string Name => $"{CrontabUtilityHook.PREFIX}schedule_task"; private readonly IServiceProvider _services; public ScheduleTaskFn(IServiceProvider services) diff --git a/src/Infrastructure/BotSharp.Core.Crontab/Hooks/CrontabUtilityHook.cs b/src/Infrastructure/BotSharp.Core.Crontab/Hooks/CrontabUtilityHook.cs index 1a71849e..ed150861 100644 --- a/src/Infrastructure/BotSharp.Core.Crontab/Hooks/CrontabUtilityHook.cs +++ b/src/Infrastructure/BotSharp.Core.Crontab/Hooks/CrontabUtilityHook.cs @@ -5,7 +5,7 @@ namespace BotSharp.Core.Crontab.Hooks; public class CrontabUtilityHook : IAgentUtilityHook { - private const string PREFIX = "util-crontab-"; + public const string PREFIX = "util-crontab-"; private const string SCHEDULE_TASK_FN = $"{PREFIX}schedule_task"; public void AddUtilities(List utilities)