MCPcopy
hub / github.com/docmirror/dev-sidecar / downloadRemoteConfig

Function downloadRemoteConfig

packages/core/src/config-api.js:34–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 timer = setInterval(download, 24 * 60 * 60 * 1000) // 1天
33 },
34 async downloadRemoteConfig () {
35 if (get().app.remoteConfig.enabled !== true) {
36 // 删除保存的远程配置文件
37 configApi.deleteRemoteConfigFile()
38 configApi.deleteRemoteConfigFile('_personal')
39 return
40 }
41
42 const remoteConfig = get().app.remoteConfig
43 await configApi.doDownloadRemoteConfig(remoteConfig.url)
44 await configApi.doDownloadRemoteConfig(remoteConfig.personalUrl, '_personal')
45 },
46 doDownloadRemoteConfig (remoteConfigUrl, suffix = '') {
47 if (!remoteConfigUrl) {
48 // 删除保存的远程配置文件

Callers

nothing calls this directly

Calls 1

getFunction · 0.70

Tested by

no test coverage detected