Skip to content

Commit 14ac0cd

Browse files
feat: use a peer url with no gbc to deploy profiles (#2492)
* feat: use a peer url with no gbc to deploy profiles * chore: bump dcl-dapps
1 parent 6473d91 commit 14ac0cd

File tree

4 files changed

+33
-11
lines changed

4 files changed

+33
-11
lines changed

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"dcl-scene-writer": "^1.1.2",
2828
"decentraland": "^3.3.0",
2929
"decentraland-builder-scripts": "^0.24.0",
30-
"decentraland-dapps": "^13.15.0",
30+
"decentraland-dapps": "^13.20.0",
3131
"decentraland-ecs": "file:ecs/decentraland-ecs-6.6.1-20201020183014.commit-bdc29ef-hotfix.tgz",
3232
"decentraland-experiments": "^1.0.2",
3333
"decentraland-transactions": "^1.42.0",

src/modules/common/sagas.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,10 @@ import { PEER_URL } from 'lib/api/peer'
4040
import { BuilderAPI } from 'lib/api/builder'
4141
import { entitySaga } from 'modules/entity/sagas'
4242
import { collectionCurationSaga } from 'modules/curations/collectionCuration/sagas'
43+
import { getPeerWithNoGBCollectorURL } from './utils'
4344
import { itemCurationSaga } from 'modules/curations/itemCuration/sagas'
4445

45-
const profileSaga = createProfileSaga({ peerUrl: PEER_URL })
46+
const profileSaga = createProfileSaga({ peerUrl: PEER_URL, peerWithNoGbCollectorUrl: getPeerWithNoGBCollectorURL() })
4647

4748
export function* rootSaga(builderAPI: BuilderAPI, newBuilderClient: BuilderClient, catalystClient: CatalystClient) {
4849
yield all([

src/modules/common/utils.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { Task } from 'redux-saga'
22
import { Action } from 'redux'
33
import { take, fork, ActionPattern, ForkEffect, cancel } from 'redux-saga/effects'
4+
import { config } from 'config'
45

56
export const takeLatestCancellable = <A extends Action>(
67
{ initializer, cancellable }: { initializer: ActionPattern<A>; cancellable: ActionPattern<A> },
@@ -20,3 +21,23 @@ export const takeLatestCancellable = <A extends Action>(
2021
}
2122
}
2223
})
24+
25+
// This is a temporary util fn to get a node with no Garbage collector so we can deploy profiles directly to a node
26+
export const getPeerWithNoGBCollectorURL = () => {
27+
const environment = config.get('ENVIRONMENT')
28+
const urls =
29+
environment === 'production'
30+
? [
31+
'peer-ec2.decentraland.org',
32+
'peer-wc1.decentraland.org',
33+
'peer-eu1.decentraland.org',
34+
'peer-ec1.decentraland.org',
35+
'interconnected.online',
36+
'peer.decentral.io',
37+
'peer.kyllian.me',
38+
'peer.uadevops.com'
39+
]
40+
: ['peer.decentraland.zone', 'peer-ue-2.decentraland.zone', 'peer-ap1.decentraland.zone']
41+
42+
return urls[Math.floor(Math.random() * urls.length)]
43+
}

0 commit comments

Comments
 (0)