Changeset 35495 for main/trunk


Ignore:
Timestamp:
2021-09-27T16:37:10+13:00 (3 years ago)
Author:
cstephen
Message:

Automatically determine if production transcription components should be used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/js/TranscribeModule.js

    r35488 r35495  
    7474
    7575        /** @type {String} The URL to which query POST requests should be made. */
    76         this.queryUrl = "//localhost:8383/gs3-koreromaori/transcribe";
     76        if (process.env.NODE_ENV !== "production") {
     77            this.queryUrl = "//localhost:8383/gs3-koreromaori/transcribe";
     78        }
     79        else {
     80            this.queryUrl = "/gs3-koreromaori/transcribe";
     81        }
    7782
    7883        /** @type {Number} The maximum number of files which can be transcribed in one request to the API. */
     
    123128     */
    124129    async transcribeFiles(files) {
     130        if (process.env.NODE_ENV !== "production") {
     131            return await this.transcribeFilesTest(files);
     132        }
     133        else {
     134            return await this.transcribeFilesActual(files);
     135        }
     136    }
     137
     138    async transcribeFilesTest(files) {
    125139        const objects = [];
    126140
Note: See TracChangeset for help on using the changeset viewer.