Skip to content

Commit

Permalink
feat: add timestamp to rep observation data file
Browse files Browse the repository at this point in the history
  • Loading branch information
mistakia committed Feb 27, 2024
1 parent ef14343 commit 0ca8318
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/generate-rep-mappings.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ debug.enable('generate-rep-mappings')

const generateRepMappings = async () => {
const url = 'https://nano.community/data/representative-observations.json'
const representatives = await request({ url })
const { representatives } = await request({ url })

const current_mappings = (await getData('representative-mappings')) || []
const mapping_results = []
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate-rep-observations.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ const generateRepObseravtions = async () => {
}
}

await saveData('representative-observations', representatives)

const timestamp = new Date().toISOString()
await saveData('representative-observations', { timestamp, representatives })
const end = process.hrtime.bigint()
log(
`Generated observations for ${representatives.length} reps in ${Number(
Expand Down

0 comments on commit 0ca8318

Please sign in to comment.