瀏覽代碼

@uppy/companion: fix Redis key default TTL (#4607)

* FIX: redis deafult expeiry

* removed commented code

* fix indentation error
Subha Sarkar 1 年之前
父節點
當前提交
39bc7ed93f
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      packages/@uppy/companion/src/server/Uploader.js

+ 3 - 1
packages/@uppy/companion/src/server/Uploader.js

@@ -413,7 +413,9 @@ class Uploader {
     // https://github.com/transloadit/uppy/issues/3748
     const keyExpirySec = 60 * 60 * 24
     const redisKey = `${Uploader.STORAGE_PREFIX}:${this.token}`
-    this.storage.set(redisKey, jsonStringify(state), 'EX', keyExpirySec)
+    this.storage.set(redisKey, jsonStringify(state), {
+      EX: keyExpirySec,
+    })
   }
 
   throttledEmitProgress = throttle((dataToEmit) => {