Updating GH actions to use Node 12 LTS to be inline with Node version used in Docker.
This commit is contained in:
parent
944d9edbad
commit
5965a04979
|
@ -16,7 +16,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [10.x]
|
||||
node-version: [12.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue