-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add headless version and dockerfile #10
Conversation
Will check this in a minute. Thanks |
|
||
private workerActive: Array<boolean> | ||
|
||
constructor (onlyProxy: boolean, workers: number) { | ||
constructor (onlyProxy: boolean, workers: number, verboseError = true) { | ||
this.onlyProxy = onlyProxy | ||
this.working = false | ||
this.workers = workers | ||
this.eventSource = new EventEmitter() | ||
this.workerActive = new Array<boolean>(256) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There must be array with dynamic workers count, not 256
@@ -105,7 +115,7 @@ export class Doser { | |||
this.setWorkersCount(this.workers) | |||
for (let i = 0; i < 256; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change 256 depending on max workers count
if (this.verboseError){ | ||
console.log(cause) | ||
} else{ | ||
console.log((cause as AxiosError)?.message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can guard TS with isAxiosError
example: https://github.com/axios/axios#typescript
Closes #6