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

System artifacts clean up task doesn't run as expected #17008

Closed
ywk253100 opened this issue Jun 15, 2022 · 3 comments
Closed

System artifacts clean up task doesn't run as expected #17008

ywk253100 opened this issue Jun 15, 2022 · 3 comments

Comments

@ywk253100
Copy link
Contributor

We are trying to create a scheduled task to run the system artifacts clean-up job at the starting of core https://github.com/goharbor/harbor/blob/main/src/core/main.go#L236.

The jobservice is required to run any jobs but it doesn't start up yet at the moment when core starts up, so the system artifacts clean-up task doesn't run as expected.

@ywk253100
Copy link
Contributor Author

ywk253100 commented Jun 28, 2022

A possible solution is that start a separated goroutine and wait for the jobservice to be ready in a loop and then create the schedule.

The goroutine is required because the jobservice also depends on the core to start up, this is a dependency loop

@prahaladdarkin
Copy link
Contributor

@ywk253100 Thank you for the above guidance. Is there an API that can be used whether the job service is up and running? Also, would it be recommended to sleep in the go routine between checks to the presence of jobservice?

@wy65701436 wy65701436 self-assigned this Jun 29, 2022
@wy65701436
Copy link
Contributor

closed by #17098

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants