seanprashad/leetcode-patterns

Multi-thread API calls to Leetcode

seanprashad opened this issue · 2 comments

With

response = api_instance.graphql_post(body=graphql_request).to_dict()
, we're able to programatically retrieve question metadata in a sequential manner using Leetcode's API.

It would be great if we were to perform these calls asynchronously in order to speed up the script (which takes ~20-30 seconds right now).

Reopened due to #232 - when the updated script ran in GitHub Actions, question #170 was being incorrectly updated with a random question's metadata.

Closing due to sporadic behaviour with GitHub Actions and multiple threads. We can revisit this at a future time when the situation warrants it.