Commit ccb244a8 authored by Ahmad Nemati's avatar Ahmad Nemati

init

parent fccec5d0
...@@ -44,11 +44,20 @@ function makeStatus(directory) { ...@@ -44,11 +44,20 @@ function makeStatus(directory) {
async function check() async function check()
{ {
let files=await fs.readdirSync('files') let files=await fs.readdirSync('files')
let size=await fs.read
for (let i=0;i<files.length;i++) for (let i=0;i<files.length;i++)
{ {
if (!files[i].includes('csv')) if (!files[i].includes('csv'))
continue continue
let stats=await fs.statSync('files/'+files[i])
if (stats.size<500)
continue
// console.log(stats.size)
let worker=await findOffWorker() let worker=await findOffWorker()
// console.log(worker) // console.log(worker)
......
...@@ -23,8 +23,7 @@ function initData(data, config, name) { ...@@ -23,8 +23,7 @@ function initData(data, config, name) {
data = JSON.stringify(data) data = JSON.stringify(data)
if (data.length<2)
return []
data = _.replace(data, new RegExp('Trade #', 'g'), 'id') data = _.replace(data, new RegExp('Trade #', 'g'), 'id')
data = _.replace(data, new RegExp('Profit %', 'g'), 'profit') data = _.replace(data, new RegExp('Profit %', 'g'), 'profit')
......
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