當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Workunit.attach方法代碼示例

本文整理匯總了TypeScript中@hpcc-js/comms.Workunit.attach方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Workunit.attach方法的具體用法?TypeScript Workunit.attach怎麽用?TypeScript Workunit.attach使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在@hpcc-js/comms.Workunit的用法示例。


在下文中一共展示了Workunit.attach方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: 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);
 }),
開發者ID:AttilaVamos,項目名稱:HPCC-Platform,代碼行數:8,代碼來源:ESPWorkunit.ts

示例2: it

 it("resubmit", function () {
     const eclWorkunit = Workunit.attach({ baseUrl: ESP_URL }, WUID);
     return eclWorkunit.resubmit()
         .then((wu) => {
             return wu.watchUntilComplete()
                 .then(() => {
                     return wu.fetchResults().then((results) => {
                         return results[0].fetchRows(0, 100);
                     }).then((rows) => {
                         logger.debug(rows);
                     });
                 });
         }).catch((e) => {
             logger.debug(e);
         });
 });
開發者ID:GordonSmith,項目名稱:Visualization,代碼行數:16,代碼來源:workunit.spec.ts

示例3: function

 load: function (response) {
     if (lang.exists("Exceptions.Exception", response)) {
         dojo.publish("hpcc/brToaster", {
             message: "<h4>" + response.Exceptions.Source + "</h4>" + "<p>" + response.Exceptions.Exception[0].Message + "</p>",
             type: "error",
             duration: -1
         });
     } else {
         _workunits[response.WUCreateResponse.Workunit.Wuid] = context;
         context.Wuid = response.WUCreateResponse.Workunit.Wuid;
         context._hpccWU = HPCCWorkunit.attach({ baseUrl: "" }, context.Wuid);
         context.startMonitor(true);
         context.updateData(response.WUCreateResponse.Workunit);
         context.onCreate();
     }
 }
開發者ID:AttilaVamos,項目名稱:HPCC-Platform,代碼行數:16,代碼來源:ESPWorkunit.ts

示例4: function

 describe.skip("WUDetails", function () {
     const wu = Workunit.attach({ baseUrl: ESP_URL }, WUID);
     it("WU Exists", function () {
         return wu.refresh().then(() => {
             expect(wu.isComplete() === true);
             expect(wu.Jobname === "GenData");
         });
     });
     /*
     it("All Props", function () {
         return wu.fetchDetails({
             ScopeOptions: {
                 IncludeId: true,
                 IncludeScope: true,
                 IncludeScopeType: true
             },
             AttributeOptions: {
                 IncludeName: true,
                 IncludeRawValue: true,
                 IncludeFormatted: true,
                 IncludeMeasure: true,
                 IncludeCreator: true,
                 IncludeCreatorType: true
             }
         }).then((scopes) => {
             scopes.forEach((scope) => {
                 scope.CAttributes.forEach((_attr) => {
                     // logger.debug(`${scope.Wuid}:${scope.Scope} (${scope.ScopeType}) -> ${JSON.stringify(_attr.properties)}`);
                 });
             });
         });
     });
     it("Filter.AttributeFilters", function () {
         return wu.fetchDetails({
             Filter: {
                 AttributeFilters: {
                     AttributeFilter: [{ Name: "WhenGraphStarted" }]
                 }
             }
         }).then((scopes) => {
             expect(scopes.length).to.be.greaterThan(0);
             scopes.forEach((scope) => {
                 expect(scope.hasAttr("WhenGraphStarted")).to.be.true;
                 scope.CAttributes.forEach((_attr) => {
                     logger.debug(`${scope.wu.Wuid}:${scope.Scope} (${scope.ScopeType}) -> ${JSON.stringify(_attr.properties)}`);
                 });
             });
         });
     });
     it("Filter.AttributeFilters+AttributeToReturn.Attributes", function () {
         return wu.fetchDetails({
             Filter: {
                 AttributeFilters: {
                     AttributeFilter: [{ Name: "WhenGraphStarted" }]
                 }
             },
             AttributeToReturn: {
                 Attributes: ["WhenGraphStarted"]
             }
         }).then((scopes) => {
             expect(scopes.length).to.be.greaterThan(0);
             scopes.forEach((scope) => {
                 scope.CAttributes.forEach((attr) => {
                     expect(attr.Name).to.equal("WhenGraphStarted");
                 });
             });
         });
     });
     it("Filter.AttributeFilters+AttributeToReturn.Measure", function () {
         return wu.fetchDetails({
             Filter: {
                 AttributeFilters: {
                     WUAttributeFilter: [{ Name: "WhenGraphStarted" }]
                 }
             },
             AttributeToReturn: {
                 Measure: "ts"
             }
         }).then((scopes) => {
             expect(scopes.length).to.be.greaterThan(0);
             scopes.forEach((scope) => {
                 scope.CAttributes.forEach((attr) => {
                     expect(attr.Measure).to.equal("ts");
                 });
             });
         });
     });
     it("WUTimeline", function () {
         return wu.fetchDetails({ Filter: { Scopes: ["workunit"] } }).then((scopes) => {
             expect(scopes.length).to.be.greaterThan(0);
             scopes.forEach((scope) => {
                 expect(scope.Scope).to.equal("workunit");
                 scope.CAttributes.forEach((_attr) => {
                     logger.debug(`${scope.wu.Wuid}:${scope.Scope} (${scope.ScopeType}) -> ${JSON.stringify(_attr.properties)}`);
                 });
             });
         });
     });
     */
 });
開發者ID:GordonSmith,項目名稱:Visualization,代碼行數:100,代碼來源:workunit.spec.ts


注:本文中的@hpcc-js/comms.Workunit.attach方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。