mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 01:35:39 -04:00
Add cronRuns table and integrate job scheduling with database logging
- Created a new `cronRuns` table to track job execution history, including job name, status, timestamps, and error messages. - Updated job scheduling logic to log job status in the `cronRuns` table, capturing success and error states. - Enhanced error handling to log detailed error messages in the database. This commit establishes a foundation for monitoring scheduled jobs and their outcomes.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE `cronRuns` (
|
||||
`id` text PRIMARY KEY,
|
||||
`jobName` text NOT NULL,
|
||||
`status` text NOT NULL,
|
||||
`startedAt` integer NOT NULL,
|
||||
`finishedAt` integer,
|
||||
`errorMessage` text
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX `cronRuns_jobName_startedAt` ON `cronRuns` (`jobName`,`startedAt`);
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user