fix(watcher): force IPv4 for PM2 and widen process-messages defaults
Avoid Gmail hang on rpi4 broken IPv6 Happy Eyeballs, and default backfill to 30d inbox / max 500. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,6 +22,9 @@ module.exports = {
|
||||
env: {
|
||||
NODE_ENV: "production",
|
||||
WATCHER_PORT: "8083",
|
||||
// Pi has broken global IPv6 (SYN-SENT via link-local); Happy Eyeballs hangs Gmail calls.
|
||||
NODE_OPTIONS:
|
||||
"--dns-result-order=ipv4first --no-network-family-autoselection",
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* npm run process-messages -w watcher -- --dry-run --max 20
|
||||
*
|
||||
* Options:
|
||||
* --query <q> Gmail search (default targets Livin/Grab subjects, newer_than:7d)
|
||||
* --query <q> Gmail search (default: in:inbox newer_than:30d)
|
||||
* --ids <a,b> Explicit message IDs (skips list search)
|
||||
* --user <email> Mailbox to use (default: first user with tokens)
|
||||
* --max <n> Max messages to process (default 50)
|
||||
* --max <n> Max messages to process (default 500)
|
||||
* --dry-run Parse and log only; do not write PocketBase
|
||||
*/
|
||||
|
||||
@@ -36,15 +36,14 @@ import { runPipeline } from "../src/pipeline.js";
|
||||
import { processFetchedMessage } from "../src/process-fetched.js";
|
||||
import { pocketbaseConfigured } from "../src/pocketbase/client.js";
|
||||
|
||||
const DEFAULT_QUERY =
|
||||
'newer_than:7d (subject:"Pembayaran Berhasil!" OR subject:"Your Grab E-Receipt" OR subject:"Pemindahan Dana Sesama Rekening BRI")';
|
||||
const DEFAULT_QUERY = "in:inbox newer_than:30d";
|
||||
|
||||
function parseArgs(argv) {
|
||||
const out = {
|
||||
query: null,
|
||||
ids: [],
|
||||
user: null,
|
||||
max: 50,
|
||||
max: 500,
|
||||
dryRun: false,
|
||||
help: false,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user