Skip to content
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

Merged
merged 2 commits into from
Mar 1, 2022
Merged

Add headless version and dockerfile #10

merged 2 commits into from
Mar 1, 2022

Conversation

lsheva
Copy link
Contributor

@lsheva lsheva commented Mar 1, 2022

Closes #6

@opengs
Copy link
Owner

opengs commented Mar 1, 2022

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)
Copy link
Owner

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++) {
Copy link
Owner

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)
Copy link
Contributor

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

@Razikus Razikus changed the base branch from master to 0.0.x March 1, 2022 23:06
@Razikus Razikus merged commit 9675c8b into opengs:0.0.x Mar 1, 2022
@constantin-ukr constantin-ukr mentioned this pull request Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants