Skip to content

Commit

Permalink
feat(clear-indexer): adds cli argument for clearing indexer stats (#650)
Browse files Browse the repository at this point in the history
this clears all values in the indexer table relevant to enabling the
indexer.

i don't think we should advertise this command in docs, but i think it
would benefit support when a user doesn't have to clear their entire db
to get around a rate limiting from torznab that would otherwise last
24hours but was really only necessary to back-off for an hour.

has happened enough times that i wish it was available for support.

---------

Co-authored-by: Michael Goodnow <mmgoodnow@gmail.com>
  • Loading branch information
zakkarry and mmgoodnow committed Apr 22, 2024
1 parent 661110f commit e71c211
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,24 @@ program
});
await db.destroy();
});

program
.command("clear-indexer-failures")
.description("Clear the cached details of indexers (failures and caps)")
.action(async () => {
console.log(
"If you've received a '429' (rate-limiting), continuing to hammer",
"your indexers may result in negative consequences.",
);
console.log(
"If you have to do this more than once in a short",
"period of time, you have bigger issues that need to be addressed.",
);
await db("indexer").update({
status: null,
retry_after: null,
});
await db.destroy();
});
program
.command("test-notification")
.description("Send a test notification")
Expand Down

0 comments on commit e71c211

Please sign in to comment.