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

feat(sdk): restart goroutines #5821

Merged
merged 2 commits into from May 24, 2021
Merged

feat(sdk): restart goroutines #5821

merged 2 commits into from May 24, 2021

Conversation

fsamin
Copy link
Member

@fsamin fsamin commented May 19, 2021

Signed-off-by: francois samin francois.samin@corp.ovh.com

Signed-off-by: francois  samin <francois.samin@corp.ovh.com>
yesnault
yesnault previously approved these changes May 19, 2021
@ovh-cds
Copy link
Collaborator

ovh-cds commented May 19, 2021

CDS Report build-all-cds#16031.0 ✘

  • Build
    • Build and Package All ✔
    • Build Debpacker ✔
    • Build OS-Ansible-Inventory ✔
    • Build SMTPMock ✘
    • Lint UI Translate ✔
    • Test CLI ✔
    • Test Engine ✘
    • Test SDK ✔
    • Test SDK Rust ✔
    • Test UI ✔

// GoRoutines contains list of routines that have to stay up
type GoRoutines struct {
mutex sync.Mutex
status map[string]bool
status []*GoRoutine
Copy link
Member

Choose a reason for hiding this comment

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

Should we keep the mutex to protect the status slice ? In case Run is called by multiple routines ?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

sdk/goroutine.go Outdated
return
case <-t.C:
for _, g := range m.status {
if !g.Active {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if !g.Active {
if !g.Active && g.Restart {

sguiheux
sguiheux previously approved these changes May 20, 2021
@ovh-cds
Copy link
Collaborator

ovh-cds commented May 20, 2021

CDS Report build-all-cds#16043.0 ✘

  • Build
    • Build and Package All ✔
    • Build Debpacker ✔
    • Build OS-Ansible-Inventory ✔
    • Build SMTPMock ✔
    • Lint UI Translate ✔
    • Test CLI ✔
    • Test Engine ✘
    • Test SDK ✔
    • Test SDK Rust ✔
    • Test UI ✔

Signed-off-by: francois  samin <francois.samin@corp.ovh.com>
@fsamin fsamin dismissed stale reviews from sguiheux and yesnault via ad41eaa May 21, 2021 13:38
@ovh-cds
Copy link
Collaborator

ovh-cds commented May 21, 2021

CDS Report build-all-cds#16049.0 ✘

  • Build
    • Build and Package All ✔
    • Build Debpacker ✔
    • Build OS-Ansible-Inventory ✔
    • Build SMTPMock ✔
    • Lint UI Translate ✔
    • Test CLI ✔
    • Test Engine ✔
    • Test SDK ✔
    • Test SDK Rust ✔
    • Test UI ✔
  • Package
    • Docker ✔
  • Integration
    • Docker Compose Tests ✔
    • Standalone Tests ✘

@sonarcloud
Copy link

sonarcloud bot commented May 24, 2021

@fsamin fsamin merged commit f8d2b30 into master May 24, 2021
@fsamin fsamin deleted the feat/sdk/restart_goroutines branch June 25, 2021 08:20
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.

None yet

5 participants