Commit 54c87554 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent ccb244a8
...@@ -49,12 +49,19 @@ async function check() ...@@ -49,12 +49,19 @@ async function check()
{ {
if (!files[i].includes('csv')) if (!files[i].includes('csv'))
{
await fs.renameSync('files/'+files[i],worker+'/'+files[i])
continue continue
}
let stats=await fs.statSync('files/'+files[i]) let stats=await fs.statSync('files/'+files[i])
if (stats.size<500) if (stats.size<500)
{
await fs.renameSync('files/'+files[i],worker+'/'+files[i])
continue continue
}
// console.log(stats.size) // console.log(stats.size)
...@@ -63,7 +70,7 @@ async function check() ...@@ -63,7 +70,7 @@ async function check()
if (worker !==null) if (worker !==null)
{ {
await fs.renameSync('files/'+files[i],worker+'/'+files[i])
await makeStatusNew(worker,'1') await makeStatusNew(worker,'1')
shell.exec('node run.js '+worker, {async: true}); shell.exec('node run.js '+worker, {async: true});
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment