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

api to run configured profiles #74

Merged
merged 1 commit into from
Dec 2, 2022

Conversation

badhrinathpa
Copy link
Contributor

No description provided.

@@ -37,7 +37,7 @@ docker-build:
. \
|| exit 1; \
done
sudo rm -rf vendor
rm -rf vendor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering why we had added sudo. and do you see any issues with sudo ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure when we added it. but when we try to run on the laptop with sudo it asks for password. so thought better to remove it. not needed in any case.

func HTTPExecuteConfigProfile(c *gin.Context) {

logger.HttpLog.Infoln("ExecuteConfigProfile API called")
//var prof profCtx.Profile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to get rid of commented code ?

profileWaitGrp.Wait()
}

c.JSON(http.StatusOK, gin.H{})
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realized yesterday that if profile takes lot of time then GUI waits for long time. Perhaps you respond to GUI immediately and then continue execution in background. If new API request comes while previous execution is still in progress then response with 200 again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should send the result of the execution in the response. had done it in the gui branch. will merge to this. its better than sending empty response.

@thakurajayL thakurajayL merged commit 1caccfc into omec-project:main Dec 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
Development

Successfully merging this pull request may close these issues.

2 participants