Commit 86ecf45b authored by wang's avatar wang

f9

parent 5778036d
import {MongoClient} from "mongodb";
import {ThreadPool} from "./ThreadPool.js";
// const uri = "mongodb://lcc-spider:JIUsfhiad&^@54.183.159.9:27017/?authSource=admin&directConnection=true";
//
//
// const client = new MongoClient(uri);
// const database = client.db("env");
// const movies = database.collection("env_shape");
// // Query for a movie that has the title 'The Room'
// const query = {
// 'env.funcs': {$ne: null},
// };
//
// // Execute query
// const movie = await movies.aggregate([
// {$match: query},
// {$sample: {size: 1}}
// ])
// let res = await movie.toArray()
// console.log(res)
const pool = new ThreadPool(5);
let data = { name: '你好' }
......
......@@ -7,7 +7,7 @@ import * as fs from "fs";
let ENVS = JSON.parse(fs.readFileSync('./env.json', 'utf-8').toString())
let keys = Object.keys(ENVS);
const uri = "mongodb://lcc-spider:JIUsfhiad&^@54.183.159.9:27017/?authSource=admin&directConnection=true";
const client = new MongoClient(uri);
// const client = new MongoClient(uri);
log4js.levels.INFO.colour = 'white';
// console.log(log4js.levels.INFO.colour);
log4js.configure({
......
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