Skip to content

[$150] Update challenge id of only latest records #221

Closed
@callmekatootie

Description

@callmekatootie

Continuing from #218

We created a script that would update the current legacy challenge id in the submission records to v5.

We would like to update this script to only read and update the latest submission records.

  • Instead of fetching all submission records from dynamodb, you would instead fetch the latest challenges using endpoint https://api.topcoder.com/v5/challenges?createdDateStart=2021-01-01&perPage=1000&isLightweight=true - you need to paginate over all the records and not just 1000.
  • After receiving all the latest challenges (or during pagination), collect all the challenge ids and for each challenge, proceed to retrieve the submissions associated with it (submissions where challengeId is equal to the one fetched earlier)
  • And then, for these submissions, proceed to update the record in dynamodb as we are doing currently in the script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions