File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -38,17 +38,12 @@ namespace :schedule do
3838 return GithubFetcher ::Repo . new ( user_name : "rails" , name : "rails" ) . success?
3939 end
4040
41- desc "Checks if repos have been deleted on GitHub "
42- task mark_removed_repos : :environment do
41+ desc "Update repos information "
42+ task update_repos : :environment do
4343 raise "GITHUB API APPEARS TO BE DOWN" unless github_api_up?
4444
45- Repo . select ( :id , :user_name , :name ) . find_each ( batch_size : 100 ) do |repo |
46- fetcher = GithubFetcher ::Repo . new ( user_name : repo . user_name , name : repo . name )
47- fetcher . call ( retry_on_bad_token : 5 )
48-
49- if fetcher . response . status == 404
50- repo . update! ( removed_from_github : true )
51- end
45+ Repo . find_each ( batch_size : 100 ) do |repo |
46+ repo . update_repo_info!
5247 end
5348 end
5449
You can’t perform that action at this time.
0 commit comments