update process.js and util.js

main
MohammadHoseinPaymard 2 weeks ago
parent b013919fd2
commit a9da28e96c
  1. 2
      process.js
  2. 11
      util.js

@ -1,3 +1,5 @@
const { convertStringToJson } = require("./util");
const getAllProcesses = async (workflow,query = {}) => {
const processes = await bpmsDB.bpms_process.findAll({
where: {

@ -4,6 +4,15 @@ const sleep = (ms)=>{
setTimeout(resolve,ms);
})
}
function convertStringToJson(string) {
try {
return JSON.parse(string);
} catch (error) {
console.log(error);
return {};
}
}
module.exports={
sleep
sleep,
convertStringToJson
}
Loading…
Cancel
Save