{"size": 1419, "ext": "js", "max_stars_repo_path": "bots/bosses/exampleBoss.js", "max_stars_repo_name": "odyquesta/Tools-for-Instagram", "max_stars_repo_stars_event_min_datetime": "2019-08-21T17:04:45.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-28T14:00:46.000Z", "max_issues_repo_path": "bots/bosses/exampleBoss.js", "max_issues_repo_name": "odyquesta/Tools-for-Instagram", "max_issues_repo_issues_event_min_datetime": "2019-10-22T16:05:13.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T08:12:37.000Z", "max_forks_repo_path": "bots/bosses/exampleBoss.js", "max_forks_repo_name": "odyquesta/Tools-for-Instagram", "max_forks_repo_forks_event_min_datetime": "2019-09-23T21:41:19.000Z", "max_forks_repo_forks_event_max_datetime": "2022-02-03T07:32:54.000Z"}
{"max_stars_count": 425, "max_issues_count": 46, "max_forks_count": 82, "avg_line_length": 28.38, "max_line_length": 109, "alphanum_fraction": 0.6180408739}
require("../../src/tools-for-instagram.js");

const keypress = async () => {
    process.stdin.setRawMode(true)
    return new Promise(resolve => process.stdin.once('data', data => {
      const byteArray = [...data]
      if (byteArray.length > 0 && byteArray[0] === 3) {
        console.log('^C')
        process.exit(1)
      }
      process.stdin.setRawMode(false)
      resolve()
    }))
}


let workerMaxSeconds = 25;
(async () => {
    console.log("Before execution, be sure to be on the root directory and execute this code like this:");
    console.log("node bots/bosses/exampleBoss.js");
    
    console.log("Press Any key to continue or Ctrl+C to exit");
    await keypress();

    console.log("loading workers");

    //The worker accounts are located on the accounts folder
    //Workers are inside bots/workers
    let worker1 =  executeWorker({
        workerName: 'exampleWorker',
        accountLoginFile: 'exampleAccount',
        timeout: workerMaxSeconds  // Set to Infinity to avoid Timeout
    });
    
    let worker2 =  executeWorker({
        workerName: 'exampleWorker',
        accountLoginFile: 'exampleAccount',
        timeout: workerMaxSeconds  // Set to Infinity to avoid Timeout
    });
    
    Promise.all([worker1, worker2]).then((results) => {
        console.log("All workers done: Result1: " + results[0].username + " Result2: " + results[1].username)
    });
    
    
})();



