Index: openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql,v diff -u -r1.9 -r1.9.2.1 --- openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 20 Sep 2002 21:19:00 -0000 1.9 +++ openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 6 Dec 2002 21:04:19 -0000 1.9.2.1 @@ -5,17 +5,15 @@ - select notification_id + select notifications.notification_id from notifications - where sysdate - notif_date > 2 - and not exists (select notifications.notification_id - from notifications, - notification_requests, - notification_user_map - where notifications.type_id = notification_requests.type_id - and notifications.object_id = notification_requests.object_id - and notifications.notification_id = notification_user_map.notification_id(+) - and sent_date is null) + minus + select notifications.notification_id + from notifications, notification_requests, notification_user_map + where notifications.type_id = notification_requests.type_id + and notifications.object_id = notification_requests.object_id + and notifications.notification_id = notification_user_map.notification_id(+) + and sent_date is null @@ -31,14 +29,15 @@ notifications.response_id from notifications, notification_requests, - notification_user_map + notification_user_map, + acs_objects notification_requests_object where notifications.type_id = notification_requests.type_id - and interval_id = :interval_id - and notifications.object_id = notification_requests.object_id - and notifications.notification_id = notification_user_map.notification_id(+) - and sent_date is null - and notifications.notif_date <= - (sysdate - (select n_seconds / 3600 / 24 from notification_intervals where interval_id= :interval_id)) + and interval_id = :interval_id + and notifications.object_id = notification_requests.object_id + and notifications.notification_id = notification_user_map.notification_id(+) + and sent_date is null + and notification_requests_object.object_id = notification_requests.request_id + and notification_requests_object.creation_date <= notifications.notif_date order by notification_requests.user_id, notification_requests.type_id