- Notifications
You must be signed in to change notification settings - Fork928
fix: fix dormancy notifications#14029
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
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
630dd87
a6bcef9
97514f5
4b75dcf
008a410
799644e
34f8aa4
5da3745
7bdce48
fc055c8
9490792
cb1ca3b
de1d381
e7557d2
886a482
ab344b3
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
UPDATE notification_templates | ||
SET | ||
body_template = E'Hi {{.UserName}}\n\n' || | ||
E'Your workspace **{{.Labels.name}}** has been marked as [**dormant**](https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) because of {{.Labels.reason}}.\n' || | ||
E'Dormant workspaces are [automatically deleted](https://coder.com/docs/templates/schedule#dormancy-auto-deletion-enterprise) after {{.Labels.timeTilDormant}} of inactivity.\n' || | ||
E'To prevent deletion, use your workspace with the link below.' | ||
WHERE | ||
id = '0ea69165-ec14-4314-91f1-69566ac3c5a0'; | ||
UPDATE notification_templates | ||
SET | ||
body_template = E'Hi {{.UserName}}\n\n' || | ||
E'Your workspace **{{.Labels.name}}** has been marked for **deletion** after {{.Labels.timeTilDormant}} of [dormancy](https://coder.com/docs/templates/schedule#dormancy-auto-deletion-enterprise) because of {{.Labels.reason}}.\n' || | ||
BrunoQuaresma marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
E'To prevent deletion, use your workspace with the link below.' | ||
WHERE | ||
id = '51ce2fdf-c9ca-4be1-8d70-628674f9bc42'; |
This file was deleted.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1101,13 +1101,11 @@ func (s *server) notifyWorkspaceBuildFailed(ctx context.Context, workspace datab | ||
return // failed workspace build initiated by a user should not notify | ||
} | ||
reason = string(build.Reason) | ||
if _, err := s.NotificationsEnqueuer.Enqueue(ctx, workspace.OwnerID, notifications.TemplateWorkspaceAutobuildFailed, | ||
map[string]string{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. I found out that | ||
"name": workspace.Name, | ||
"reason": reason, | ||
}, "provisionerdserver", | ||
// Associate this notification with all the related entities. | ||
workspace.ID, workspace.OwnerID, workspace.TemplateID, workspace.OrganizationID, | ||
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.