opencode-supertask 0.1.15 → 0.1.17
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/dist/cli/index.js +71 -21
- package/dist/cli/index.js.map +1 -1
- package/dist/gateway/index.js +8 -7
- package/dist/gateway/index.js.map +1 -1
- package/dist/plugin/supertask.js +21753 -21080
- package/dist/plugin/supertask.js.map +1 -1
- package/dist/web/index.js +8 -7
- package/dist/web/index.js.map +1 -1
- package/dist/worker/index.js +8 -7
- package/dist/worker/index.js.map +1 -1
- package/package.json +1 -1
package/dist/web/index.js
CHANGED
|
@@ -16651,9 +16651,10 @@ var TaskService = class {
|
|
|
16651
16651
|
const hasExcludedBatches = scope.excludedBatchIds && scope.excludedBatchIds.length > 0;
|
|
16652
16652
|
let batchFilter;
|
|
16653
16653
|
if (hasExcludedBatches) {
|
|
16654
|
-
|
|
16655
|
-
|
|
16656
|
-
|
|
16654
|
+
batchFilter = or(
|
|
16655
|
+
isNull(tasks2.batchId),
|
|
16656
|
+
sql`${tasks2.batchId} NOT IN ${scope.excludedBatchIds}`
|
|
16657
|
+
);
|
|
16657
16658
|
}
|
|
16658
16659
|
const statusConditions = or(
|
|
16659
16660
|
and(
|
|
@@ -16818,7 +16819,7 @@ var TaskService = class {
|
|
|
16818
16819
|
if (conditions.length > 0) {
|
|
16819
16820
|
query = query.where(and(...conditions));
|
|
16820
16821
|
}
|
|
16821
|
-
query = query.orderBy(desc(tasks2.createdAt));
|
|
16822
|
+
query = query.orderBy(desc(tasks2.createdAt), desc(tasks2.id));
|
|
16822
16823
|
if (options.limit) {
|
|
16823
16824
|
query = query.limit(options.limit);
|
|
16824
16825
|
}
|
|
@@ -16920,10 +16921,10 @@ var TaskRunService = class {
|
|
|
16920
16921
|
return result[0] || null;
|
|
16921
16922
|
}
|
|
16922
16923
|
static async listByTaskId(taskId) {
|
|
16923
|
-
return await db.select().from(taskRuns2).where(eq(taskRuns2.taskId, taskId)).orderBy(desc(taskRuns2.startedAt));
|
|
16924
|
+
return await db.select().from(taskRuns2).where(eq(taskRuns2.taskId, taskId)).orderBy(desc(taskRuns2.startedAt), desc(taskRuns2.id));
|
|
16924
16925
|
}
|
|
16925
16926
|
static async getLatestByTaskId(taskId) {
|
|
16926
|
-
const result = await db.select().from(taskRuns2).where(eq(taskRuns2.taskId, taskId)).orderBy(desc(taskRuns2.startedAt)).limit(1);
|
|
16927
|
+
const result = await db.select().from(taskRuns2).where(eq(taskRuns2.taskId, taskId)).orderBy(desc(taskRuns2.startedAt), desc(taskRuns2.id)).limit(1);
|
|
16927
16928
|
return result[0] || null;
|
|
16928
16929
|
}
|
|
16929
16930
|
static async getLatestByTaskIds(taskIds) {
|
|
@@ -16971,7 +16972,7 @@ var TaskRunService = class {
|
|
|
16971
16972
|
}));
|
|
16972
16973
|
}
|
|
16973
16974
|
static async getRunningRunByTaskId(taskId) {
|
|
16974
|
-
const result = await db.select().from(taskRuns2).where(and(eq(taskRuns2.taskId, taskId), eq(taskRuns2.status, "running"))).orderBy(desc(taskRuns2.startedAt)).limit(1);
|
|
16975
|
+
const result = await db.select().from(taskRuns2).where(and(eq(taskRuns2.taskId, taskId), eq(taskRuns2.status, "running"))).orderBy(desc(taskRuns2.startedAt), desc(taskRuns2.id)).limit(1);
|
|
16975
16976
|
return result[0] || null;
|
|
16976
16977
|
}
|
|
16977
16978
|
static async deleteByTaskIds(taskIds) {
|