-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Status: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedSomething isn't working as documenteddeno
Description
Follow up to #2075
What happened?
@laughedelic was able to narrow down the problem to the throttle plugin.
import { Octokit } from "https://cdn.skypack.dev/@octokit/core"; import { throttling } from "https://cdn.skypack.dev/@octokit/plugin-throttling"; const MyOctokit = Octokit.plugin(throttling); const octokit = new MyOctokit({ auth: Deno.env.get("GITHUB_TOKEN"), throttle: { onRateLimit: (retryAfter: any, options: any, octokit: any) => { return true; }, onAbuseLimit: (retryAfter: any, options: any, octokit: any) => { octokit.log.warn(`Abuse detected for request ${options.method} ${options.url}`); }, }, }); octokit.log.warn("foo");It prints
foo
and hangs. If I remove everything relatedthrottling
, it prints the message and exits.A workaround for this hanging is to add
Deno.exit(0)
at the end.
What did you expect to happen?
The deno process should exit, just like Node does
What the problem might be
The throttle plugin is using bottleneck by @SGrondin. Maybe it's a known issue?
I'd appreciate if someone with more deno experience could try to reproduce the hanging problem with just Bottleneck. The sourcecode where we use bottleneck
is here: https://github.com/octokit/plugin-throttling.js/
laughedelic, wperron, wuhuizuo, hen-x, skatsuta and 8 more
Metadata
Metadata
Assignees
Labels
Status: Up for grabsIssues that are ready to be worked on by anyoneIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documentedSomething isn't working as documenteddeno
Type
Projects
Status
🔥 Backlog