Skip to content

Commit

Permalink
Fixed typo in example json. Key should have been called name, not dat…
Browse files Browse the repository at this point in the history
…abase.
  • Loading branch information
Jack Richards committed Nov 19, 2023
1 parent 8f43249 commit c9fdb2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions bptf-autopricer.js
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,6 @@ const calculateAndEmitPrices = async () => {
}
};

(async () => {
await calculateAndEmitPrices();
})();

setInterval(async () => {
await calculateAndEmitPrices();
}, 15 * 60 * 1000); // Every 15 minutes.
Expand Down Expand Up @@ -321,6 +317,9 @@ schemaManager.init(async function(err) {
if (err) {
throw err;
}
// Calculate and emit prices on startup.
await calculateAndEmitPrices();
// Listen for events from the bptf socket.
rws.addEventListener('message', event => {
var json = JSON.parse(event.data);
// forwards-compatible support of the batch mode, if you did not set the batch-test header.
Expand Down
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"schema": "tf2",
"host": "localhost",
"port": 5432,
"database": "backpacktf-ws",
"name": "backpacktf-ws",
"user": "postgres",
"password": "database password"
},
Expand Down

0 comments on commit c9fdb2c

Please sign in to comment.