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

Pause maintenance between repos during same task #303

Merged
merged 1 commit into from
Jan 23, 2020
Merged

Pause maintenance between repos during same task #303

merged 1 commit into from
Jan 23, 2020

Conversation

derrickstolee
Copy link
Contributor

@derrickstolee derrickstolee commented Jan 22, 2020

The PauseVerb was added along with a lot of other things in #292. It creates a file storing a timestamp for marking how long to pause maintenance. As noted in #284, this was inadequate. If there are a lot of enlistments and a user runs scalar pause in the middle of iterating over those enlistments, the maintenance task will continue to run over all of those enlistments.

Now, stop before triggering a new scalar run <task> process. Modify the markdown with the details for how many maintenance tasks completed and whether or not it was halted due to a pause. Here is a formatted version of a trace event for a task during pause:

[2020-01-22 17:17:57.7293 -05:00] RunMaintenanceTaskForRepos_MaintenanceSummary 
{
"task":"loose-objects",
"UserId":"S-1-5-21-4082248826-4152932973-4176629329-1001",
"SessionId":1,
"traceMessage":"Maintenance is paused until 1/23/2020 4:14:44 AM.",
"reposInRegistryForUser":11,
"reposSkipped":11,
"reposSuccessfullyRemoved":0,
"repoRemovalFailures":0,
"reposMaintained":0,
"haltedForPause":true
}

Copy link
Member

@kewillford kewillford left a comment

Choose a reason for hiding this comment

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

Looks good. Just a couple naming suggestions.

Scalar.Service/MaintenanceTaskScheduler.cs Outdated Show resolved Hide resolved
Scalar.Service/MaintenanceTaskScheduler.cs Outdated Show resolved Hide resolved
Signed-off-by: Derrick Stolee <stolee@gmail.com>
@derrickstolee
Copy link
Contributor Author

/azp run microsoft.scalar

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@derrickstolee
Copy link
Contributor Author

/azp run microsoft.scalar

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@derrickstolee derrickstolee merged commit 64531d3 into microsoft:master Jan 23, 2020
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