try {
  var licenseKey = require('./license').Key
} catch (e) {
  var licenseKey = {}
}
module.exports = {
  subdomain: 'system',
  SECRET: '0xD58F835B69D207A76CC5F84a70a1D0d4C79dAC95', // temporary...
  licenseKey: licenseKey,
  email: {
    host: 'smtp.office365.com', // your sender-email smtp host
    port: 587, // smtp server port
    secure: false, // true for 465, false for other ports
    auth: {
      user: 'your sender-email',
      pass: 'your sender-email password' // generated ethereal password
    },
    secureConnection: false,
    tls: {
      ciphers: 'SSLv3'
    }
  },
  scheduler: {
    /* Name to be used for setting client's "application" properties when registering a schedule */
    application: 'aidoop-r',
    /* Base endpoint to be used for setting "callback" properties when registering a schedule */
    callbackBase: 'http://localhost:3000',
    /* 
        Scheduler service endpoint
        caution) endpoint for "localhost" has some problem. 
        https://github.com/node-fetch/node-fetch/issues/1624
      */
    endpoint: 'http://127.0.0.1:9902'
  },
  // pubsub: {
  //   middleware: 'redisCluster', // empty, redis, mqtt, redisCluster
  //   nodes: [{ host: '127.0.0.1', port: 6379 }],
  //   options: {}
  // },
  // pubsub: {
  //   middleware: 'redis', // empty, redis, mqtt, redisCluster
  //   host: 'localhost',
  //   port: 6379,
  //   options: {}
  // },
  logger: {
    file: {
      filename: 'logs/application-%DATE%.log',
      datePattern: 'YYYY-MM-DD-HH',
      zippedArchive: false,
      maxSize: '20m',
      maxFiles: '2d',
      level: 'info'
    },
    console: {
      level: 'silly'
    }
  },
  ormconfig: {
    name: 'default',
    type: 'sqlite',
    database: 'db.sqlite',
    synchronize: false,
    logging: true,
    logger: 'debug'
  },
  // ormconfig: {
  //   name: 'default',
  //   type: 'postgres',
  //   host: '127.0.0.1',
  //   port: 5432,
  //   database: 'aidoop_r',
  //   username: 'postgres',
  //   password: 'hatioLAB1008',
  //   synchronize: true,
  //   logging: false
  // },
  // ormconfig: {
  //   name: 'default',
  //   type: 'postgres',
  //   host: '127.0.0.1',
  //   port: 55432,
  //   database: 'postgres',
  //   username: 'postgres',
  //   password: 'abcd1234',
  //   synchronize: true,
  //   logging: true
  // },
  uploads: 'uploads',
  vision: {
    streamingPort: 3001,
    camera: {
      cameraCalibrator: {
        program: [
          '/Users/jinwonchoi/.pyenv/versions/3.7.8/envs/objtrack2/bin/python3',
          //'/Users/jinwonchoi/github/things-factory/packages/operato-robotics/object-tracker-python/object_tracker/calibcamera_engine.py',
          '/Users/jinwonchoi/github/things-factory/packages/operato-robotics/object-tracker-python/object_tracker/objtracking_entry.py',
          'CAMERACALIB'
        ]
      },
      handEyeCalibrator: {
        program: [
          '/Users/jinwonchoi/.pyenv/versions/3.7.8/envs/objtrack2/bin/python3',
          //'/Users/jinwonchoi/github/things-factory/packages/operato-robotics/object-tracker-python/object_tracker/calibhandeye_engine.py',
          '/Users/jinwonchoi/github/things-factory/packages/operato-robotics/object-tracker-python/object_tracker/objtracking_entry.py',
          'HANDEYECALIB'
        ]
      },
      ROIDetector: {
        program: [
          '/Users/jinwonchoi/.pyenv/versions/3.7.8/envs/objtrack2/bin/python3',
          '/Users/jinwonchoi/github/things-factory/packages/operato-robotics/object-tracker-python/object_tracker/roi_engine.py'
        ]
      }
    },
    robotArm: {
      markerOffsetCalibrator: {
        program: [
          '/Users/jinwonchoi/.pyenv/versions/3.7.8/envs/objtrack2/bin/python3',
          '/Users/jinwonchoi/github/things-factory/packages/operato-robotics/object-tracker-python/object_tracker/objecttracking_engine.py'
        ]
      }
    },
    objectTracker: {
      program: [
        '/Users/jinwonchoi/.pyenv/versions/3.7.8/envs/objtrack2/bin/python3',
        '/Users/jinwonchoi/github/things-factory/packages/operato-robotics/object-tracker-python/object_tracker/objecttracking_engine.py'
      ]
    }
  }
  //   vision: {
  //     streamingPort: 3001,
  //     camera: {
  //       cameraCalibrator: {
  //         program: ['python3', '/app/object-tracker-python/object_tracker/calibcamera_engine.py']
  //       },
  //       handEyeCalibrator: {
  //         program: ['python3', '/app/object-tracker-python/object_tracker/calibhandeye_engine.py']
  //       },
  //       ROIDetector: {
  //         program: ['python3', '/app/object-tracker-python/object_tracker/roi_engine.py']
  //       }
  //     },
  //     robotArm: {
  //       markerOffsetCalibrator: {
  //         program: ['python3', '/app/object-tracker-python/object_tracker/objecttracking_engine.py']
  //       }
  //     },
  //     objectTracker: {
  //       program: ['python3', '/app/object-tracker-python/object_tracker/objecttracking_engine.py']
  //     }
  //   }
  //   vision: {
  //     streamingPort: 3001,
  //     camera: {
  //       cameraCalibrator: {
  //         program: [
  //           '/home/jinwon/Documents/venv/objtrack/bin/python3',
  //           '/home/jinwon/Documents/github/object-tracker-python/object_tracker/calibcamera_engine.py'
  //         ]
  //       },
  //       handEyeCalibrator: {
  //         program: [
  //           '/home/jinwon/Documents/venv/objtrack/bin/python3',
  //           '/home/jinwon/Documents/github/object-tracker-python/object_tracker/calibhandeye_engine.py'
  //         ]
  //       },
  //       ROIDetector: {
  //         program: [
  //           '/home/jinwon/Documents/venv/objtrack/bin/python3',
  //           '/home/jinwon/Documents/github/object-tracker-python/object_tracker/roi_engine.py'
  //         ]
  //       }
  //     },
  //     robotArm: {
  //       markerOffsetCalibrator: {
  //         program: [
  //           '/home/jinwon/Documents/venv/objtrack/bin/python3',
  //           '/home/jinwon/Documents/github/object-tracker-python/object_tracker/objecttracking_engine.py'
  //         ]
  //       }
  //     },
  //     objectTracker: {
  //       program: [
  //         '/home/jinwon/Documents/venv/objtrack/bin/python3',
  //         '/home/jinwon/Documents/github/object-tracker-python/object_tracker/objecttracking_engine.py'
  //       ]
  //     }
  //   }
}
