Skip to content

Commit 635314f

Browse files
author
Alan Shaw
authored
fix: switch to cluster local add (#2012)
The NFT storage cluster is struggling - switch to local add.
1 parent 5b91a35 commit 635314f

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

packages/api/src/routes/nfts-store.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export async function nftStore(event, ctx) {
4545

4646
const blob = new Blob([JSON.stringify(data)])
4747
const metadata = await cluster.add(blob, {
48-
local: false,
48+
local: true,
4949
})
5050
const block = await Block.encode({
5151
value: {
@@ -58,7 +58,7 @@ export async function nftStore(event, ctx) {
5858
})
5959
const car = await CAR.encode([block.cid], [block])
6060
const { cid, bytes } = await cluster.addCar(car, {
61-
local: false,
61+
local: true,
6262
})
6363

6464
await db.createUpload({

packages/api/src/routes/nfts-upload.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export async function uploadCarWithStat(
141141
) {
142142
const [added, backupUrl] = await Promise.all([
143143
cluster.addCar(car, {
144-
local: false,
144+
local: true,
145145
}),
146146
ctx.backup
147147
? ctx.backup.backupCar(user.id, stat.rootCid, car, stat.structure)

0 commit comments

Comments
 (0)