本文整理匯總了TypeScript中@hpcc-js/comms.Workunit類的典型用法代碼示例。如果您正苦於以下問題:TypeScript Workunit類的具體用法?TypeScript Workunit怎麽用?TypeScript Workunit使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Workunit類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it("query", function () {
return Workunit.query({ baseUrl: ESP_URL }, { State: "completed", LastNDays: 7, Count: 3 }).then((wus) => {
wus.forEach((wu) => {
logger.debug(`${wu.Wuid} Total Cluster Time: ${wu.TotalClusterTime}`);
});
});
});
示例2: inherited
constructor: ESPUtil.override(function (inherited, args) {
inherited(arguments);
if (args) {
declare.safeMixin(this, args);
}
this.wu = this;
this._hpccWU = HPCCWorkunit.attach({ baseUrl: "" }, this.Wuid);
}),
示例3: Promise
return new Promise((resolve) => {
if (wu1.isComplete()) {
resolve();
} else {
wu1.on("completed", () => {
resolve();
});
}
});