Index: openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/Attic/sweep-procs-oracle.xql,v diff -u -r1.11 -r1.12 --- openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 13 Feb 2003 20:24:34 -0000 1.11 +++ openacs-4/packages/notifications/tcl/sweep-procs-oracle.xql 4 Jul 2003 20:40:26 -0000 1.12 @@ -9,14 +9,16 @@ from notifications minus select nnr.notification_id - from (select notification_id, user_id - from notifications, notification_requests + 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) nnr, + 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 + and notification_user_map.sent_date is null @@ -32,7 +34,8 @@ notification_requests.delivery_method_id, notification_requests.request_id, notifications.response_id, - notifications.notif_date + notifications.notif_date, + notifications.notif_user from notifications, notification_requests where notifications.type_id = notification_requests.type_id and notifications.object_id = notification_requests.object_id @@ -43,7 +46,7 @@ and notification_user_map.sent_date is null and acs_objects.object_id = nnr.request_id and acs_objects.creation_date <= nnr.notif_date - order by nnr.user_id, nnr.type_id + order by nnr.user_id, nnr.type_id, nnr.notif_date Index: openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/Attic/sweep-procs-postgresql.xql,v diff -u -r1.4 -r1.5 --- openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql 16 Jan 2003 13:53:10 -0000 1.4 +++ openacs-4/packages/notifications/tcl/sweep-procs-postgresql.xql 4 Jul 2003 20:40:26 -0000 1.5 @@ -10,8 +10,9 @@ 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 + where sent_date is null and creation_date <= notif_date @@ -24,14 +25,16 @@ user_id, type_id, delivery_method_id, - response_id + response_id, + notif_date, + notif_user 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 and interval_id = :interval_id - order by user_id, type_id + order by user_id, type_id, notif_date