Create cron job for marking suspected duplicates

VERIFIED FIXED in 1.7.7

Status

Socorro
General
P1
normal
VERIFIED FIXED
7 years ago
6 years ago

People

(Reporter: jberkus, Assigned: rhelmer)

Tracking

Trunk
1.7.7
x86
Mac OS X
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
Please create a cron job (and python wrapper) which calls the following SQL:

SELECT update_reports_duplicates(start_time,end_time)

This should be called on the same schedule as the TCBS cron job, i.e. every hour, for a period 3 hours in the past.  IN ADDITION, you need to call it twice, staggering 1/2 hour.

This:

some_time = now - 3 hours

SELECT update_reports_duplicates(some_time, some_time - interval '1 hour')

some_time = some_time + 30 minutes

SELECT update_reports_duplicates(some_time, some_time - interval '1 hour')
(Reporter)

Updated

7 years ago
Blocks: 629088
(Assignee)

Updated

7 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 1

7 years ago
Created attachment 514737 [details] [diff] [review]
add cron for duplicate detection

I pulled attachment 514655 [details] from bug 629088 to my local dev db to test this; I did not do a complete test, just enough to ensure that the function didn't throw any errors.

The reason there are commits in here is to avoid:
psycopg2.ProgrammingError: relation "new_reports_duplicates" already exists

Since the function does:
"""
create temporary table new_reports_duplicates
on commit drop
"""

Let me know what you think.
Attachment #514737 - Flags: review?(lars)
(Assignee)

Updated

7 years ago
Attachment #514737 - Flags: review?(lars) → review?(laura)

Comment 2

7 years ago
Comment on attachment 514737 [details] [diff] [review]
add cron for duplicate detection

Seems basically fine.  Let's make sure this gets into the crontab on stage.
Attachment #514737 - Flags: review?(laura) → review+
(Assignee)

Comment 3

7 years ago
Comment on attachment 514737 [details] [diff] [review]
add cron for duplicate detection

Committed revision 2963.
(Assignee)

Updated

7 years ago
Depends on: 636570
(Assignee)

Updated

7 years ago
Depends on: 636620
(Assignee)

Comment 4

7 years ago
This ran as expected, but waiting on 1.7.7 schema updates (bug 636620).
(Assignee)

Updated

7 years ago
Priority: -- → P1
(Assignee)

Comment 5

7 years ago
This is now running on stage, ready for QA.
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Verified the fixed using submitter.py. Rob, thanks for taking time to help yesterday.
Status: RESOLVED → VERIFIED
Component: Socorro → General
Product: Webtools → Socorro
You need to log in before you can comment on or make changes to this bug.