Skip to content

Commit 47d198d

Browse files
committed
Change timeout var to more descriptive updateInterval
1 parent 84f0f7e commit 47d198d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/theme/src/cli/utilities/theme-uploader.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,13 @@ export function uploadTheme(
8080

8181
const {progress: uploadProgress, promise: uploadPromise} = await uploadJobPromise
8282

83-
const timeout = options.multiEnvironment ? 4000 : 1000
83+
const updateInterval = options.multiEnvironment ? 4000 : 1000
8484

8585
await renderTasksToStdErr(
8686
createIntervalTask({
8787
promise: uploadPromise,
8888
titleGetter: () => `Uploading files to remote theme ${getProgress(uploadProgress)}`,
89-
timeout,
89+
updateInterval,
9090
}),
9191
context?.stderr,
9292
options?.multiEnvironment,
@@ -97,7 +97,7 @@ export function uploadTheme(
9797
createIntervalTask({
9898
promise: deletePromise,
9999
titleGetter: () => `Cleaning your remote theme ${getProgress(deleteProgress)}`,
100-
timeout,
100+
updateInterval,
101101
}),
102102
context?.stderr,
103103
options?.multiEnvironment,
@@ -118,11 +118,11 @@ export function uploadTheme(
118118
function createIntervalTask({
119119
promise,
120120
titleGetter,
121-
timeout,
121+
updateInterval,
122122
}: {
123123
promise: Promise<unknown>
124124
titleGetter: () => string
125-
timeout: number
125+
updateInterval: number
126126
}) {
127127
const tasks: Task[] = []
128128

@@ -132,7 +132,7 @@ function createIntervalTask({
132132
task: async () => {
133133
const result = await Promise.race([
134134
promise,
135-
new Promise((resolve) => setTimeout(() => resolve('timeout'), timeout)),
135+
new Promise((resolve) => setTimeout(() => resolve('timeout'), updateInterval)),
136136
])
137137

138138
if (result === 'timeout') {

0 commit comments

Comments
 (0)