Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refactor(coderd/provisionerdserver): use quartz.Clock instead of TimeNowFn#15642

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
DanielleMaywood merged 3 commits intomainfromdm-provisionerdserver-quartz
Nov 25, 2024

Conversation

DanielleMaywood
Copy link
Contributor

@DanielleMaywoodDanielleMaywood commentedNov 25, 2024
edited
Loading

Relates to#15082 (comment) (and#15594)

For testing the autostart change in the linked PR we need to have control over time in theprovisionerdserver. Currently that is possible with aTimeNowFn but this wasn't hooked up tocoderd. This PR replacesTimeNowFn inprovisionerdserver withquartz.Clock as well as passescoderd'sClock toprovisionerdserver.

@DanielleMaywoodDanielleMaywood changed the titlerefactor(provisionerdserver): use quartz.Clock instead of TimeNowFnrefactor(coderd/provisionerdserver): use quartz.Clock instead of TimeNowFnNov 25, 2024
@DanielleMaywoodDanielleMaywood marked this pull request as ready for reviewNovember 25, 2024 15:38
@DanielleMaywoodDanielleMaywood marked this pull request as draftNovember 25, 2024 15:44
@DanielleMaywoodDanielleMaywood marked this pull request as ready for reviewNovember 25, 2024 15:58
Comment on lines +237 to +238
func (s*server)timeNow(tags...string) time.Time {
returndbtime.Time(s.Clock.Now(tags...))
Copy link
Member

Choose a reason for hiding this comment

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

nice 👍

Comment on lines +196 to +198
ifoptions.Clock==nil {
options.Clock=quartz.NewReal()
}
Copy link
Member

Choose a reason for hiding this comment

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

👍 Even ifapi.Clock isnil for some reason this should keep us covered.

Copy link
Contributor

@dannykoppingdannykopping left a comment

Choose a reason for hiding this comment

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

Hell yeah

@DanielleMaywoodDanielleMaywood merged commit0896f33 intomainNov 25, 2024
27 checks passed
@DanielleMaywoodDanielleMaywood deleted the dm-provisionerdserver-quartz branchNovember 25, 2024 16:25
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@dannykoppingdannykoppingdannykopping approved these changes

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@DanielleMaywoodDanielleMaywood

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@DanielleMaywood@dannykopping@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp