Created
April 25, 2014 17:22
-
-
Save richardking/11296917 to your computer and use it in GitHub Desktop.
deleting an instagram in a team stream
This file contains 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
1) Find instagram in api endpoint- e.g. | |
http://api.bleacherreport.com/api/v1/team_streams/baltimore-ravens | |
2) Look for instagram- e.g. | |
{ | |
type: "Instagram", | |
id: 763, | |
tag: 148, | |
publishedAt: "2014-04-25T17:02:34Z", | |
programmedAt: "2014-04-25T17:02:34Z", | |
permalink: "http://instagram.com/p/nOHErZp0y0/", | |
mediaType: "image", | |
instagramUsername: "ravens", | |
text: "@l_webb21 #ravens offseason conditioning program #hardwork #grindin", | |
instagramProfileImage: "http://images.ak.instagram.com/profiles/profile_231432514_75sq_1358984521.jpg", | |
fullName: "Baltimore Ravens", | |
imageUrlStandard: "http://origincache-frc.fbcdn.net/10261095_686297601431382_605070786_n.jpg", | |
featuredImage: false, | |
gameUpdate: false | |
}, | |
3) Log into prod-br console | |
4) Find the instagram by id (from team stream json)- e.g. | |
InstagramMedia.find(763) | |
5) Make sure it is the correct one. Then delete it- | |
InstagramMedia.find(763).destroy | |
6) Log into br-api console (br ssh prod-api-app) | |
7) Delete the redis key for that team stream- e.g. | |
baltimore-ravens is tag_id 148 | |
run this in console: | |
REDIS.keys("api:team_stream:json:148*").each {|key| REDIS.del(key) } | |
8) Rebuild team stream- e.g. | |
run in api console: | |
UpdateTeamStream.perform("baltimore-ravens") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment