@qianxude/tem 0.4.3 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qianxude/tem",
3
- "version": "0.4.3",
3
+ "version": "0.4.5",
4
4
  "description": "A lightweight task execution engine for IO-bound workloads with SQLite persistence, retry, and rate limiting",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
@@ -27,7 +27,7 @@ interface TaskTiming {
27
27
 
28
28
  interface RecentError {
29
29
  error: string;
30
- failed_at: string;
30
+ completed_at: string;
31
31
  }
32
32
 
33
33
  interface WatchOptions {
@@ -105,12 +105,12 @@ function getRecentErrors(db: Database, batchId: string, limit: number): RecentEr
105
105
  return db.query<RecentError>(
106
106
  `SELECT
107
107
  error,
108
- failed_at
108
+ completed_at
109
109
  FROM task
110
110
  WHERE batch_id = ?
111
111
  AND status = 'failed'
112
112
  AND error IS NOT NULL
113
- ORDER BY failed_at DESC
113
+ ORDER BY completed_at DESC
114
114
  LIMIT ?`,
115
115
  [batchId, limit]
116
116
  );
@@ -396,7 +396,7 @@ function renderFinalReport(
396
396
  lines.push('');
397
397
  lines.push('Recent Failures');
398
398
  const errorData = recentErrors.slice(0, 5).map(e => ({
399
- time: formatTimestamp(e.failed_at).slice(0, 19),
399
+ time: formatTimestamp(e.completed_at).slice(0, 19),
400
400
  error: truncate(e.error, 60),
401
401
  }));
402
402
  lines.push(renderTable(