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 -N -r1.21 -r1.22 --- openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 7 Aug 2017 23:48:13 -0000 1.21 +++ openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 15 Nov 2017 10:40:28 -0000 1.22 @@ -3,25 +3,6 @@ oracle8.1.6 - - - select notifications.notification_id - from notifications - minus - select nnr.notification_id - from (select notification_id, user_id - from notifications, notification_requests, acs_objects - where notifications.type_id = notification_requests.type_id - and notifications.object_id = notification_requests.object_id - and notification_requests.request_id = acs_objects.object_id - and acs_objects.creation_date <= notifications.notif_date) nnr, - notification_user_map - where nnr.notification_id = notification_user_map.notification_id(+) - and nnr.user_id = notification_user_map.user_id(+) - and notification_user_map.sent_date is null - - - select nnr.* Index: openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql,v diff -u -N -r1.13 -r1.14 --- openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql 7 Aug 2017 23:48:13 -0000 1.13 +++ openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql 15 Nov 2017 10:40:28 -0000 1.14 @@ -3,19 +3,6 @@ postgresql7.1 - - - select notification_id - from notifications - except - select distinct notification_id - from notifications inner join notification_requests using (type_id, object_id) - inner join acs_objects on (notification_requests.request_id = acs_objects.object_id) - left outer join notification_user_map using (notification_id, user_id) - where sent_date is null and creation_date <= notif_date - - - select notification_id, Index: openacs-4/packages/notifications/tcl/sweep-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/sweep-procs.xql,v diff -u -N -r1.4 -r1.5 --- openacs-4/packages/notifications/tcl/sweep-procs.xql 7 Aug 2017 23:48:13 -0000 1.4 +++ openacs-4/packages/notifications/tcl/sweep-procs.xql 15 Nov 2017 10:40:28 -0000 1.5 @@ -2,6 +2,20 @@ + + + select notification_id + from notifications + where notification_id not in ( + select distinct notification_id + from notifications inner join notification_requests using (type_id, object_id) + inner join acs_objects on (notification_requests.request_id = acs_objects.object_id) + left outer join notification_user_map using (notification_id, user_id) + where sent_date is null and creation_date <= notif_date + ) + + + delete from notification_requests