Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 67843c5

Browse files
greyscaledkylecarbs
authored andcommitted
fix: increase default extension time (#2172)
This does not fully close #2141, but builds upon #2171 to fulfill each of the UX requests. A next step (probably as a separate ticket) is to allow customizing extension time pre-emptively.
1 parent 6dc4228 commit 67843c5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

site/src/util/workspace.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe("util > workspace", () => {
4747
[
4848
"2022-06-02T14:56:34Z",
4949
{
50-
deadline: "2022-06-02T16:26:34Z",
50+
deadline: "2022-06-02T18:56:34Z",
5151
},
5252
],
5353

@@ -56,7 +56,7 @@ describe("util > workspace", () => {
5656
[
5757
"2022-06-02T10:56:20-04:00",
5858
{
59-
deadline: "2022-06-02T16:26:20Z",
59+
deadline: "2022-06-02T18:56:20Z",
6060
},
6161
],
6262
])(`defaultWorkspaceExtension(%p) returns %p`, (startTime, request) => {

site/src/util/workspace.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,10 +251,10 @@ export const isWorkspaceOn = (workspace: TypesGen.Workspace): boolean => {
251251

252252
export const defaultWorkspaceExtension = (__startDate?: dayjs.Dayjs): TypesGen.PutExtendWorkspaceRequest => {
253253
const now = __startDate ? dayjs(__startDate) : dayjs()
254-
const NinetyMinutesFromNow = now.add(90, "minutes").utc()
254+
const fourHoursFromNow = now.add(4, "hours").utc()
255255

256256
return {
257-
deadline: NinetyMinutesFromNow.format(),
257+
deadline: fourHoursFromNow.format(),
258258
}
259259
}
260260

0 commit comments

Comments
 (0)