Lines Matching full:date
19 # Format Appears as: [Date] [Time] - [Msg Level] - [Message]
26 WHERE %(table)s.%(time_column)s <= "%(date)s"
32 WHERE %(related_table)s.%(time_column)s <= "%(date)s"
42 WHERE %(related_table)s.%(time_column)s <= "%(date)s"
130 date, foreign_key=None,
149 @param related_table: Table with the date information we are selecting by.
153 @param date: End date of the information we are trying to delete.
154 @param time_column: Column that we want to use to compare the date to.
156 delete with the table with the date information.
161 to the table with the date information.
169 time_column=time_column, date=date)
172 # Deleting using a single JOIN to get the date information.
176 time_column=time_column, date=date)
188 time_column=time_column, date=date)
213 def _subtract_days(date, days_to_subtract): argument
215 Return a date (string) that is 'days' before 'date'
217 @param date: date (string) we are subtracting from.
220 date_obj = datetime.datetime.strptime(date, '%Y-%m-%d')
225 def _delete_all_data_before_date(date): argument
227 Delete all the database data before a given date.
233 days before date. Then we do the queries using tko_jobs and these
239 @param date: End date of the information we are trying to delete.
242 # First cleanup all afe_job related data (prior to 2 days before date).
244 afe_date = _subtract_days(date, 2)
284 # date.
286 date)
289 date, foreign_key=TEST_IDX)
292 date, foreign_key= 'test_id')
295 date)
298 date)
301 date)
304 date, foreign_key='job_id')
307 'tko_jobs', AFE_JOB_ID, date,
314 date, foreign_key='queue_entry_id',
320 date, foreign_key='job_id')
323 date, foreign_key='job_id')
326 date, foreign_key='job_id')
329 date, foreign_key='id')
332 date, foreign_key=JOB_IDX)
334 None, None, date)
345 parser.add_argument('date', help='Keep results newer than')
357 if not re.match(DATE_FORMAT_REGEX, args.date):
358 print 'DATE must be in yyyy-mm-dd format!'
363 _delete_all_data_before_date(args.date)