Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

208 add metadata read and write #215

Merged
merged 13 commits into from
Jan 13, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use LAST_UPDATE_KEY constant for metadata in prepareUploadTask
thomas-senechal committed Jan 13, 2025
commit d9355a86dfd7a805c43686e12acc6d2c961436b0
3 changes: 2 additions & 1 deletion cli/src/tasks/prepareUpload.ts
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ import {
filesInitCost,
sendFilesInits,
} from '../lib/website/filesInit'
import { LAST_UPDATE_KEY } from '../lib/website/metadata'
import { Metadata } from '../lib/website/models/Metadata'

import { UploadCtx } from './tasks'
@@ -26,7 +27,7 @@ export function prepareUploadTask(): ListrTask {

const utcNowDate = U64.fromNumber(Math.floor(Date.now() / 1000))

ctx.metadatas.push(new Metadata('LAST_UPDATE', utcNowDate.toString()))
ctx.metadatas.push(new Metadata(LAST_UPDATE_KEY, utcNowDate.toString()))

return task.newListr(
[