Add profile slot 17
- price times 4 Signed-off-by: Pakin <pakin.t@forth.co.th>
This commit is contained in:
parent
9df9d1b75f
commit
45b2470fb4
2 changed files with 19 additions and 12 deletions
28
app.js
28
app.js
|
|
@ -23,8 +23,9 @@ const { startup } = require("./lib/zmq");
|
||||||
const { CronJobs } = require("./cron-jobs");
|
const { CronJobs } = require("./cron-jobs");
|
||||||
const { google } = require("googleapis");
|
const { google } = require("googleapis");
|
||||||
const { EventEmitter } = require("stream");
|
const { EventEmitter } = require("stream");
|
||||||
|
const fs = require('fs/promises');
|
||||||
|
|
||||||
const nproc = require('./lib/nproc');
|
// const nproc = require('./lib/nproc');
|
||||||
|
|
||||||
require("dotenv").config();
|
require("dotenv").config();
|
||||||
|
|
||||||
|
|
@ -103,18 +104,18 @@ const drive = GoogleFunctions.Drive(auth);
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
let client = new nproc.NprocClient("127.0.0.1:36540", () => {
|
// let client = new nproc.NprocClient("127.0.0.1:36540", () => {
|
||||||
client.subscribe("self");
|
// client.subscribe("self");
|
||||||
client.publish("self", {
|
// client.publish("self", {
|
||||||
msg: "test"
|
// msg: "test"
|
||||||
});
|
// });
|
||||||
|
|
||||||
if(client.history.length > 1){
|
// if(client.history.length > 1){
|
||||||
Log.info("connected!");
|
// Log.info("connected!");
|
||||||
}
|
// }
|
||||||
}, () => {
|
// }, () => {
|
||||||
Log.debug("closed connection");
|
// Log.debug("closed connection");
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
const pm = new PluginsManager(cronTasks, CronJobs);
|
const pm = new PluginsManager(cronTasks, CronJobs);
|
||||||
|
|
@ -136,6 +137,9 @@ for (let scriptName of Object.keys(pm.scripts)) {
|
||||||
endpointMap = undefined; // reset
|
endpointMap = undefined; // reset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// const filePath = new URL('./package.json', import.meta.url);
|
||||||
|
// const contents = await readFile(filePath, { encoding: 'utf8' });
|
||||||
|
|
||||||
// pm.loop()
|
// pm.loop()
|
||||||
|
|
||||||
// catch 404 and forward to error handler
|
// catch 404 and forward to error handler
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,8 @@ function getSlotFunctionByIndex(index) {
|
||||||
return (price) => "HIDE";
|
return (price) => "HIDE";
|
||||||
case 9:
|
case 9:
|
||||||
return (price) => price * 0.60;
|
return (price) => price * 0.60;
|
||||||
|
case 17:
|
||||||
|
return (price) => price * 4.0;
|
||||||
default:
|
default:
|
||||||
return (price) => price;
|
return (price) => price;
|
||||||
}
|
}
|
||||||
|
|
@ -200,6 +202,7 @@ const ProfilePrice = {
|
||||||
changelogs: [
|
changelogs: [
|
||||||
"2/4/25 initialized version 2, fix timeout on trigger",
|
"2/4/25 initialized version 2, fix timeout on trigger",
|
||||||
"8/4/25 initialized version 3, express server",
|
"8/4/25 initialized version 3, express server",
|
||||||
|
"17/11/25 add slot 17 price times 4"
|
||||||
],
|
],
|
||||||
maximum_slots: MAXIMUM_SLOTS,
|
maximum_slots: MAXIMUM_SLOTS,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue