karagenit / ignore-bot

Github API Bot which makes PRs to Ignore Common Files
MIT License
0 stars 1 forks source link

Multithreading #10

Open karagenit opened 7 years ago

karagenit commented 7 years ago

https://www.tutorialspoint.com/ruby/ruby_multithreading.htm

First, start a thread for each token. That thread starts the following threads at different time intervals:

Run Query 41 Times
(interval 90 seconds)

Run Fork 1230 Times
Run Edit 1230 Times
Create PRs 1230 Times
Delete Forks 1230 Times
(interval 3 seconds)

And we wouldn't need the cron job, as this could just be perpetually running with these delays.

karagenit commented 7 years ago

We will want to have a field in our DB for the status of each repo, so that each thread can query the DB for a repo at the state they want (ie fork thread finds one that has status "ready to be forked")

karagenit commented 7 years ago

What about for each file? Need to rotate queries...

karagenit commented 7 years ago

Uniquely, searches are limited to 1,800 per hour regardless of the 5,000 limit.