mafintosh / mafintosh/block-trace

Customise the timeout

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
69
Forks
5
PR merge metrics
No merged PRs in 30d

Description

How would I go about customising the timeout? I'm not sure if I should alter https://github.com/mafintosh/block-trace/blob/master/bin.js#L33 or https://github.com/mafintosh/block-trace/blob/master/bin.js#L53 or both?

It would be great to be able to set BLOCK_TRACE_TIMEOUT as an environment variable and have it read from defaulting to 1000 if it wasn't set?

```
var timeoutEnv = Number(process.env.BLOCK_TRACE_TIMEOUT),
timeout = Number.isNaN(timeoutEnv) ? 1000 : timeoutEnv;
```

Contributor guide

No contributing guide indexed for this repository

Research direction

The timeout handling is in bin.js at lines 33 and 53; start by comparing those two uses and how the command currently obtains its timeout. Done means BLOCK_TRACE_TIMEOUT overrides the timeout, while an unset or non-numeric value retains the default of 1000.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli, devtools
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.