Cronjobs + AnthropicService Singleton Refactoring
Cronjobs: - CronjobService (BackgroundService) prüft jede Minute auf fällige Jobs - Cron-Expression in Server-Lokalzeit via Cronos (CronFormat.Standard) - Cronjob-Ausführung: Prompt → Session → Agent-Antwort in Chat-History - Optionale Benachrichtigungs-Session (notify_session_id): Zusammenfassung wird in separate Session geschrieben (z.B. mit Telegram) - Telegram-Benachrichtigung mit Cronjob-Name + Ursprungs-Session - REST API: CRUD + toggle + manuelles Ausführen (/run) - Frontend: Dashboard-Cards, Cronjob-Formular mit Cron-Vorschau, Session-Dropdown, Notify-Session-Dropdown, Status-Box Refactoring: - AnthropicService als Singleton in DI registriert - ChatEndpoint + TelegramService nutzen injizierte Instanz - Redundante Dependencies (Token, ToolService, MemoryService) entfernt Neue Dateien: - Models/CronjobRecord.cs - Services/CronjobService.cs - Endpoints/CronjobEndpoint.cs - wwwroot/js/pages/cronjob-page.js - PLAN-Cronjob.md
This commit is contained in:
1 parent
0120bb8f73
commit
b645625b56
16 files changed
+1132
-28
No files matched your search
@@ -0,0 +1,23 @@
|
||||
namespace Gott.Models;
|
||||
|
||||
public class CronjobRecord
|
||||
{
|
||||
public string CronjobId { get; set; } = "";
|
||||
public string UserId { get; set; } = "";
|
||||
public string SessionId { get; set; } = "";
|
||||
public string Name { get; set; } = "";
|
||||
public string CronExpression { get; set; } = "";
|
||||
public string Prompt { get; set; } = "";
|
||||
public string NotifySessionId { get; set; } = "";
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
public string LastRunAt { get; set; } = "";
|
||||
public string NextRunAt { get; set; } = "";
|
||||
public string LastRunStatus { get; set; } = "";
|
||||
public string LastRunError { get; set; } = "";
|
||||
public string CreatedAt { get; set; } = "";
|
||||
public string UpdatedAt { get; set; } = "";
|
||||
|
||||
// Joined from sessions table
|
||||
public string SessionName { get; set; } = "";
|
||||
public string NotifySessionName { get; set; } = "";
|
||||
}
|
||||
Reference in new issue
Block a user