Created
September 27, 2011 19:16
-
-
Save lsandov1/1245955 to your computer and use it in GitHub Desktop.
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
Pseudocode | |
# first part: remove disable accounts | |
disabled_accounts = query("where"=> "status is pause or delete") # This is a Ooyala V2 Request | |
for each disabled_account in disabled_accounts | |
remove disabled_account folder on webDav server (there is no need to mark embed code's as deleted, I believe) | |
# second part: remove delete assets on (live) accounts | |
accounts = query("where" => "status is live") # This is an Ooyala V2 Request | |
for each account in accounts | |
ooyala_embed_codes = query("where" => "status is live") #This is an Ooyala V2 request | |
webdav_embed_codes = list account folder on webDav and extract embed codes | |
# we need to remove (from ooyala and on the webdav server) those webdav_embed_codes which are not present on ooyala_embed_codes | |
for each webdav_embed_code in webdav_embed_codes | |
if webdav_embed_code does not exist on ooyala_embed_codes | |
mark the webdav_embed_code as deleted # this is an Ooyala V1 request | |
remove webdav_embed_code folder on webDav server | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment