tg_factory_main.js 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. setInterval(() => {
  2. }, 15000);
  3. const ProcessManager = require('./ProcessManager');
  4. const helper = require('./src/helper');
  5. const HttpClient = require('./src/HttpClient');
  6. const redis_help = require('./src/use_redis');
  7. const tools = require('./tools');
  8. redis_help.connect( async (results)=>{
  9. if(results){
  10. // main()
  11. console.log("results:",await redis_help.getKeyValue("isPauseTask"))
  12. }
  13. })
  14. // let main = async function(){
  15. // let test = new HttpClient()
  16. // const postData = {
  17. // cmd:"create_link",
  18. // name:"台风夜老婆去救男秘书",
  19. // bookId:"1848991033902665730",
  20. // topUpTemplateId:"1854833762266247169",
  21. // passBackTemplateId:"6",
  22. // paidPoint:0,
  23. // token:await tools.getHyToken()
  24. // };
  25. // let data = {
  26. // "name": postData.name,
  27. // "bookId": postData.bookId,
  28. // "passBackTemplateId": postData.passBackTemplateId,
  29. // "adPassbackTemplateId": "",
  30. // "topUpTemplateId": postData.topUpTemplateId,
  31. // "mediaChannel": "1",
  32. // "group": "35",
  33. // "paidPoint": postData.paidPoint,
  34. // "site": "5"
  35. // }
  36. // let res = await test.otherPost( helper.getHyCreateLinkOpt(postData.token) ,data)
  37. // console.log("res:",res)
  38. // let response = {
  39. // "message": "create_link successfully",
  40. // "received_data":{"originalId":res["data"]["originalId"],
  41. // "appId":res["data"]["appId"],
  42. // "launchPath":res["data"]["launchPath"],
  43. // "fullPath":res["data"]["fullPath"],
  44. // "wxMountLink":res["data"]["wxMountLink"]}
  45. // }
  46. // console.log("response:",response)
  47. // }
  48. // var main = function(){
  49. // require("./2_PRODUCT_FACTORY/PRODUCT_FACTORY")
  50. // require("./5_CREATE_LINK_FACTORY/CREATE_LINK_FACTORY")
  51. // require("./MAIN_SERVE_FACTORY/MAIN_SERVE_FACTORY")
  52. // require("./0_RECEIVE_FACTORY/RECEIVE_FACTORY")
  53. // require("./1_FILTER_FACTORY/FILTER_FACTORY")
  54. // }
  55. // let main = function(){
  56. // let manager = new ProcessManager()
  57. // manager.start()
  58. // manager.workers.forEach((v,k)=>{
  59. // if (v.process) {
  60. // v.process.send({
  61. // type: 'config',
  62. // data: { /* 配置数据 */ }
  63. // });
  64. // }
  65. // })
  66. // }