|
@@ -76,15 +76,19 @@ if __name__ == '__main__':
|
|
|
date_object = datetime.datetime.strptime(scratching.date, "%Y-%m-%d").date()
|
|
date_object = datetime.datetime.strptime(scratching.date, "%Y-%m-%d").date()
|
|
|
day_abbr = date_object.strftime('%a')
|
|
day_abbr = date_object.strftime('%a')
|
|
|
query = """
|
|
query = """
|
|
|
- SELECT start_time, utctime FROM race_program
|
|
|
|
|
|
|
+ SELECT start_time, utctime, torn FROM race_program
|
|
|
WHERE race_date = %s AND
|
|
WHERE race_date = %s AND
|
|
|
venue = %s AND
|
|
venue = %s AND
|
|
|
race = %s;
|
|
race = %s;
|
|
|
"""
|
|
"""
|
|
|
cursor.execute(query, (scratching.date, scratching.venue, scratching.race))
|
|
cursor.execute(query, (scratching.date, scratching.venue, scratching.race))
|
|
|
db_data = cursor.fetchone()
|
|
db_data = cursor.fetchone()
|
|
|
- message_string = 'venue = {} {} {}-{} | race = {} starts at {} | {} UTC | horse = {}'
|
|
|
|
|
- message = message_string.format(day_abbr,
|
|
|
|
|
|
|
+ flag = ''
|
|
|
|
|
+ if db_data.torn:
|
|
|
|
|
+ flag = 'FLAGGED!! '
|
|
|
|
|
+ message_string = '{}venue = {} {} {}-{} | race = {} starts at {} | {} UTC | horse = {}'
|
|
|
|
|
+ message = message_string.format(flag,
|
|
|
|
|
+ day_abbr,
|
|
|
scratching.date,
|
|
scratching.date,
|
|
|
scratching.state,
|
|
scratching.state,
|
|
|
scratching.venue,
|
|
scratching.venue,
|