Skip to content

Commit

Permalink
Change in ananoticker polling, disable Sentry error capture
Browse files Browse the repository at this point in the history
  • Loading branch information
tombertrand committed Nov 7, 2023
1 parent a78c132 commit d12ee9b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion server/client/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const client = redis.createClient(NL_REDIS_PORT, NL_REDIS_HOST, {

client.on("connect", function () {
client.select(NL_REDIS_DB_INDEX);
console.log("Connected to Redis");
console.log(`Connected to NL Redis ON DB ${NL_REDIS_DB_INDEX}`);
});

client.on("error", function (err) {
Expand Down
2 changes: 1 addition & 1 deletion server/cron/nanobrowserquestStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const client = redis.createClient(NBQ_REDIS_PORT, NBQ_REDIS_HOST, {

client.on("connect", function () {
client.select(NBQ_REDIS_DB_INDEX); // NBQ DB
console.log("Connected to Redis");
console.log(`Connected to NBQ Redis ON DB ${NBQ_REDIS_DB_INDEX}`);

if (process.env.NODE_ENV === "production") {
getNanoBrowserQuestLeaderboard();
Expand Down
11 changes: 8 additions & 3 deletions server/cron/nanotickerStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,16 @@ const doNanotickerStats = async () => {

nodeCache.set(NANOTICKER_STATS, { cps });
} catch (err) {
Sentry.captureException(err);
//@NOTE throws too much....
// Sentry.captureException(err);
}
};

// Every 3 seconds
cron.schedule("*/3 * * * * *", async () => {
// Every 10 seconds
cron.schedule("*/10 * * * * *", async () => {
doNanotickerStats();
});

if (!nodeCache.get(NANOTICKER_STATS)) {
doNanotickerStats();
}

0 comments on commit d12ee9b

Please sign in to comment.