dankgrinder 7.74.0 → 7.75.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/grinder.js +1 -3
- package/lib/rawLogger.js +8 -1
- package/package.json +1 -1
package/lib/grinder.js
CHANGED
|
@@ -2760,8 +2760,6 @@ async function start(apiKey, apiUrl, opts = {}) {
|
|
|
2760
2760
|
` ${c.dim}·${c.reset} ${rgb(52, 211, 153)}Auto-Recovery${c.reset}` +
|
|
2761
2761
|
` ${c.dim}·${c.reset} ${rgb(251, 191, 36)}Loss Limiter${c.reset}`
|
|
2762
2762
|
);
|
|
2763
|
-
console.log(bar);
|
|
2764
|
-
|
|
2765
2763
|
log('info', `${c.dim}Fetching accounts...${c.reset}`);
|
|
2766
2764
|
|
|
2767
2765
|
const fetchOpts = CLOUD_MODE ? { cloud: true } : {};
|
|
@@ -2826,7 +2824,7 @@ async function start(apiKey, apiUrl, opts = {}) {
|
|
|
2826
2824
|
|
|
2827
2825
|
// Init rawLogger Redis (uses same URL — logs all raw gateway data)
|
|
2828
2826
|
if (REDIS_URL) {
|
|
2829
|
-
rawLogger.init(
|
|
2827
|
+
rawLogger.init(redis);
|
|
2830
2828
|
// Listen for DM events across all accounts — update worker state + dashboard LIVE
|
|
2831
2829
|
rawLogger.onDmEvent((event, raw) => {
|
|
2832
2830
|
const channelId = raw.channel_id;
|
package/lib/rawLogger.js
CHANGED
|
@@ -30,7 +30,14 @@ const memRing = [];
|
|
|
30
30
|
let memIdx = 0;
|
|
31
31
|
|
|
32
32
|
// ── Redis init ──
|
|
33
|
-
async function init(
|
|
33
|
+
async function init(redisUrlOrInstance) {
|
|
34
|
+
// Support passing an existing Redis instance directly (preferred)
|
|
35
|
+
if (redisUrlOrInstance && typeof redisUrlOrInstance.status !== 'undefined') {
|
|
36
|
+
redis = redisUrlOrInstance;
|
|
37
|
+
redisReady = redis.status === 'ready';
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const redisUrl = redisUrlOrInstance;
|
|
34
41
|
if (!redisUrl) {
|
|
35
42
|
console.log('[rawLogger] No Redis URL — raw logging disabled');
|
|
36
43
|
return;
|