Closed Bug 636283 Opened 13 years ago Closed 13 years ago

Create cron job for marking suspected duplicates

Categories

(Socorro :: General, task, P1)

x86
macOS

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jberkus, Assigned: rhelmer)

References

Details

Attachments

(1 file)

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')
Blocks: 629088
Status: NEW → ASSIGNED
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)
Attachment #514737 - Flags: review?(lars) → review?(laura)
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+
Comment on attachment 514737 [details] [diff] [review]
add cron for duplicate detection

Committed revision 2963.
Depends on: 636570
Depends on: 636620
This ran as expected, but waiting on 1.7.7 schema updates (bug 636620).
Priority: -- → P1
This is now running on stage, ready for QA.
Status: ASSIGNED → RESOLVED
Closed: 13 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.

Attachment

General

Created:
Updated:
Size: