Last active
December 17, 2015 02:19
-
-
Save brenfrow/5534675 to your computer and use it in GitHub Desktop.
Rerun LSAPI index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| campaigns = CampaignIDEnumerator.new(scheduler_queue: ShardCreation.daily_scheduler_queue) | |
| campaigns.each do |campaign_id| | |
| begin | |
| campaign = Campaign.find(campaign_id) | |
| snapshot = campaign.to_packrat_snapshot("mtoken") | |
| date = Date.new(2013, 5, 4) | |
| cycle_id = "index~83" | |
| puts "cycle_id #{cycle_id}; date #{date}" | |
| packrat_cycle = Packrat::CollectionCycle.new(cycle_id, date, Date.today) | |
| Packrat.start_collection(snapshot, packrat_cycle, 'LSAPI') | |
| rescue StandardError => e | |
| puts " - #{campaign.id} errored: #{e.message}" | |
| end | |
| end and nil | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment