<s> import sys , os <EOL> if sys . version < "<STR_LIT>" : <EOL> os . execl ( "<STR_LIT>" , "<STR_LIT>" , * sys . argv ) <EOL> import ConfigParser <EOL> import datetime <EOL> import urllib2 <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . normpath ( os . path . realpath ( __file__ ) + <EOL> '<STR_LIT>' ) ) <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . normpath ( os . path . realpath ( __file__ ) + <EOL> '<STR_LIT>' ) ) <EOL> from logic import constants as constants_module <EOL> config = ConfigParser . ConfigParser ( ) <EOL> config . read ( os . path . normpath ( os . path . realpath ( __file__ ) + '<STR_LIT>' ) ) <EOL> constants = dict ( constants_module . dictionary . items ( ) + <EOL> constants_module . defaults . items ( ) + config . items ( '<STR_LIT>' ) ) <EOL> for constant in constants : <EOL> try : <EOL> constants [ constant ] = int ( constants [ constant ] ) <EOL> except : <EOL> pass <EOL> from autumn . db . connection import autumn_db <EOL> autumn_db . conn . connect ( '<STR_LIT>' , host = constants [ '<STR_LIT>' ] , <EOL> user = constants [ '<STR_LIT>' ] , passwd = constants [ '<STR_LIT>' ] , <EOL> db = constants [ '<STR_LIT>' ] , charset = "<STR_LIT:utf8>" , use_unicode = True ) <EOL> from models import base as models <EOL> types = [ '<STR_LIT>' ] + constants [ '<STR_LIT>' ] + [ '<STR_LIT>' ] <EOL> for t in types : <EOL> content_options = { <EOL> '<STR_LIT:type>' : t , <EOL> '<STR_LIT>' : False , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : datetime . datetime . utcnow ( ) - <EOL> datetime . timedelta ( days = constants [ '<STR_LIT>' ] ) <EOL> } <EOL> content_remote = models . content_remote . get ( ** content_options ) [ : ] <EOL> for content in content_remote : <EOL> try : <EOL> content . delete ( ) <EOL> except : <EOL> pass </s>
