Updating GH actions to use Node 12 LTS to be inline with Node version used in Docker.

This commit is contained in:
mike12345567 2020-09-22 10:12:17 +01:00
parent 944d9edbad
commit 5965a04979
2 changed files with 16 additions and 16 deletions

View File

@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
node-version: [10.x]
node-version: [12.x]
steps:
- uses: actions/checkout@v2

View File

@ -1,21 +1,21 @@
const triggers = require("./triggers")
const environment = require("../environment")
//const workerFarm = require("worker-farm")
const workerFarm = require("worker-farm")
const singleThread = require("./thread")
//let workers = workerFarm(require.resolve("./thread"))
let workers = workerFarm(require.resolve("./thread"))
// function runWorker(job) {
// return new Promise((resolve, reject) => {
// workers(job, err => {
// if (err) {
// reject(err)
// } else {
// resolve()
// }
// })
// })
// }
function runWorker(job) {
return new Promise((resolve, reject) => {
workers(job, err => {
if (err) {
reject(err)
} else {
resolve()
}
})
})
}
/**
* This module is built purely to kick off the worker farm and manage the inputs/outputs
@ -23,9 +23,9 @@ const singleThread = require("./thread")
module.exports.init = function() {
triggers.workflowQueue.process(async job => {
if (environment.BUDIBASE_ENVIRONMENT === "PRODUCTION") {
//await runWorker(job)
await singleThread(job)
await runWorker(job)
} else {
console.log("Testing standard thread")
await singleThread(job)
}
})