@solazah/solazah-runtime 0.0.187 → 0.0.193

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": "@solazah/solazah-runtime",
3
- "version": "0.0.187",
3
+ "version": "0.0.193",
4
4
  "main": "index.cjs",
5
5
  "module": "index.js",
6
6
  "types": "types/index.d.ts",
package/types/System.d.ts CHANGED
@@ -141,10 +141,17 @@ export default class System {
141
141
  * 以及 once 类型触发后自动停调度的逻辑。
142
142
  *
143
143
  * @param id 目标任务 id。
144
- * @returns `{ok: boolean; error?: string}`;ok 为 true 表示触发成功进入执行,
144
+ * @param options 可选触发选项;runId 可指定可跟踪运行的 id。
145
+ * @returns `{ok: boolean; runId?: string; error?: string}`;ok 为 true 表示触发成功进入执行,
145
146
  * ok 为 false 时 error 说明原因(如 "task not found" / "task disabled" / "expired" / "previous run still in flight")。
146
147
  */
147
- runNow: (id: string) => Promise<any>;
148
+ runNow: (id: string, options?: {
149
+ runId?: string;
150
+ }) => Promise<{
151
+ ok: boolean;
152
+ runId?: string;
153
+ error?: string;
154
+ }>;
148
155
  /**
149
156
  * 校验 cron 表达式合法性(委托 node-cron 的 validate)。
150
157
  *