npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

owhat-job

v0.1.0

Published

owhat红包清理

Downloads

12

Readme

gcl

目录

  • Copy

  • 除log文件夹可能需要配置链接文件夹外读取和写入权限 其它文件需要有读取权限。 ##Introduction

  • 程序主要为scimport.js,csoimport.js

  • 启动方式为pm2 start processes.json 分别启动1个进行进行处理

  • 配置文件为env.npcf 其中请查找 需要修改 字样进行配置

   //一次取数据总数
       "SC.count": "500000",
       //一次插入数据的数量
       "SC.max": "250000",
       //线程数
       "SC.threadcount": "3",
       //ES连接 需要修改
       "SC.host": 'tst-shdu-a03:39201',
       //ES日志类型
       "SC.log": 'trace',
       //ES索引名
       "SC.index": 'dcdata',
       //ES类型名
       "SC.type": 'contract',
       //一次取数据总数 可根据线上内存情况修改
       "CSO.count": "500000",
       //一次插入数据的数量
       "CSO.max": "250000",
       //线程数 可根据线上内存情况修改
       "CSO.threadcount": "3",
       //ES连接 需要修改
       "CSO.host": 'tst-shdu-a03:39201',
       //ES日志类型 需要修改
       "CSO.log": 'trace',
       //ES索引名
       "CSO.index": 'sdmdata',
       //ES类型名
       "CSO.type": 'cso',
       //需要修改 DC数据库 要求有链接服务器或者数据库方便在一个SQL中插入和更新访问独立的数据库表 ESImport表。
       "dcconnect": {
           "server": "123.127.153.137",
           "localAddress": "123.127.153.137",
           "port": "1433",
           "user": "Dev_Env_DBUser",
           "password": "qwert12345",
           "database": "Datacenter-Dev",
           "pool": { "min": 0, "max": 10, "idleTimeoutMillis": 3000 },
           "timeout": 60000
       },
       //需要修改 SDM数据库 要求有链接服务器或者数据库方便在一个SQL中插入和更新访问独立的数据库表 ESImport表。
       "sdmconnect": {
           "server": "123.127.153.137",
           "localAddress": "123.127.153.137",
           "port": "1433",
           "user": "Dev_Env_DBUser",
           "password": "qwert12345",
           "database": "SDM_DEV",
           "pool": { "min": 0, "max": 10, "idleTimeoutMillis": 3000 },
           "timeout": 60000
       }
  • 配置文件为processes.json 其中请查找 需要修改 字样进行配置
       "apps": [{
       // Application #1 
       "name": "UPT.Server-SCimporter",
       "script": "./scimport.js",
       "instances": "1",
       "exec_mode": "cluster",
       "args": ["env.npcf"],
       "node_args": "--harmony",
       "merge_logs": true,
       "cwd": "./",
       "max_memory_restart": "2048M",//可能需要修改
       "log_date_format": "YYYYMMDDHH",
       "error_file": "./log/UPT_Server_SC_pm2_err.log",//需要修改路径
       "env": {
           "NODE_ENV": "development",
           "AWESOME_SERVICE_API_TOKEN": "xxx"
       },
       "watch": ["./**/*.js"],
       "ignore_watch": [],
       "watch_options": { "followSymlinks": false }
   }, {
       // Application #1
       "name": "UPT.Server-CSOimporter",
       "script": "./csoimport.js",
       "instances": "1",
       "exec_mode": "cluster",
       "args": ["env.npcf"],
       "node_args": "--harmony",
       "merge_logs": true,
       "cwd": "./",
       "max_memory_restart": "2048M",//可能需要修改
       "log_date_format": "YYYYMMDDHH",
       "error_file": "./log/UPT_Server_CSO_pm2_err.log",//需要修改路径
       "env": {
           "NODE_ENV": "development",
           "AWESOME_SERVICE_API_TOKEN": "xxx"
       },
       "watch": ["./**/*.js"],
       "ignore_watch": [],
       "watch_options": { "followSymlinks": false }
   }]
  • 2017-8-23 #TaskID 2201-2203 UPT出险率报表更新 需要添加对修改状态和删除的合同工单的处理,并将合同中未过滤320,420状态的合同进行删除
  • 更新内容
    • Ni/ni.npcf 更新导入合同的 320,420过滤
    • Ni/update.npcf 添加如上3个服务的update SQL
    • env.npcf 添加appsettings下的3个节点,请注意更新host(线上es地址)
    • processes.json 添加新增的3个服务及其配置
    • csobupdate_single.js 添加对csob改为300的数据的处理
    • csoupdate_single.js 添加对cso改为300的数据的处理
    • scupdate_single.js 添加对sc改为320,420的数据的处理
   env.npcf 新增
       "USC":{"count":100000,"max":5000,"threadcount":30,"host":"ES地址","log":"error","index":"dcdata","type":"contract"},
       "UCSO":{"count":100000,"max":5000,"threadcount":30,"host":"ES地址","log":"error","index":"sdmdata","type":"cso"},
       "UCSOB":{"count":100000,"max":5000,"threadcount":30,"host":"ES地址","log":"error","index":"sdmbdata","type":"csob"},
   processes.json 新增
   {
       // Application #1
       "name": "UPT.Server-SCupdater",
       "script": "./scupdate_single.js",
       "instances": "1",
       "exec_mode": "cluster",
       "args": ["env.npcf"],
       "node_args": "--harmony",
       "merge_logs": true,
       "cwd": "./",
       "max_memory_restart": "2048M",
       "log_date_format": "YYYYMMDDHH",
       "error_file": "./log/UPT_update_SC_pm2_err.log",
       "out_file": "./log/UPT_update_SC_pm2_out.log",
       "env": {
           "NODE_ENV": "development",
           "AWESOME_SERVICE_API_TOKEN": "xxx"
       },
       "watch": ["./**/*.js"],
       "ignore_watch": [],
       "watch_options": { "followSymlinks": false }
   }, {
       // Application #1
       "name": "UPT.Server-CSOupdater",
       "script": "./csoupdate_single.js",
       "instances": "1",
       "exec_mode": "cluster",
       "args": ["env.npcf"],
       "node_args": "--harmony",
       "merge_logs": true,
       "cwd": "./",
       "max_memory_restart": "2048M",

       "log_date_format": "YYYYMMDDHH",
       "error_file": "./log/UPT_Update_CSO_pm2_err.log",
       "out_file": "./log/UPT_Update_CSO_pm2_out.log",
       "env": {
           "NODE_ENV": "development",
           "AWESOME_SERVICE_API_TOKEN": "xxx"
       },
       "watch": ["./**/*.js"],
       "ignore_watch": [],
       "watch_options": { "followSymlinks": false }
   }, {
       // Application #1
       "name": "UPT.Server-CSOBupdater",
       "script": "./csobupdate_single.js",
       "instances": "1",
       "exec_mode": "cluster",
       "args": ["env.npcf"],
       "node_args": "--harmony",
       "merge_logs": true,
       "cwd": "./",
       "max_memory_restart": "2048M",

       "log_date_format": "YYYYMMDDHH",
       "error_file": "./log/UPT_Update_CSOB_pm2_err.log",
       "out_file": "./log/UPT_Update_CSOB_pm2_out.log",
       "env": {
           "NODE_ENV": "development",
           "AWESOME_SERVICE_API_TOKEN": "xxx"
       },
       "watch": ["./**/*.js"],
       "ignore_watch": [],
       "watch_options": { "followSymlinks": false }
   }
  • 2017-8-24 #TaskID 2201 UPT出险率报表更新 需要添加将合同中未过滤220,420状态的合同进行删除
  • 更新内容
    • Ni/ni.npcf 更新导入合同的 320,420过滤
    • Ni/update.npcf 添加如上3个服务的update SQL
    • scupdate_single.js 添加对sc改为220,420的数据的处理