• last updated 15 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Replace leftover occurrences

  1. … 1 more file in changeset.
Deprecate notification::get_delivery_method_id, same as notification::delivery::get_id and looking more established

  1. … 6 more files in changeset.
Deprecate notification::get_interval_id, duplicated by notification::interval::get_id_from_name which appears to be more established

    • -21
    • +38
    ./test/notifications-test-procs.tcl
  1. … 4 more files in changeset.
Prefer flushing the cache, this addresses the automated test, where multiple insert/deletion are performed in the same request

Extend test

    • -12
    • +36
    ./test/notifications-test-procs.tcl
Cache the new type_id immediately in the (rare) event that a type was created in a previous request with the same name and then deleted

Expand test

    • -1
    • +10
    ./test/notifications-test-procs.tcl
Fix typo in xql file

    • -1
    • +1
    ./notification-request-procs-postgresql.xql
Extend notifications tests

    • -0
    • +154
    ./test/notifications-test-procs.tcl
Prefer the non cached api when deleting, as the id is cached in the thread and could be stale

Some tests for the notifications api, more to come

    • -0
    • +110
    ./test/notifications-test-procs.tcl
file notifications-test-procs.tcl was initially added on branch oacs-5-10.

    • -0
    • +0
    ./test/notifications-test-procs.tcl
Added parameter for sweep interval for stale notification as stated in a comment already.

Many thanks to Franz Penz for pusing this.

  1. … 1 more file in changeset.
Fixes for Oracle 19c: make query portable to Oracle by replacing USING by explicit ON joins

This fixed the following problem, where the problem is not easy to spot on first sight:

[16/Feb/2022:13:26:09][12845.7efd2d3e1700][-sched:0:41:22-] Error: nsoracle.c:1367:OracleSelect: error in `OCIStmtExecute ()': ORA-00904: "NOTIFICATION_REQUESTS"."USER_ID": invalid identifier

: SQL:

: select notification_id,

: notif_subject,

: notif_text,

: notif_html,

: file_ids,

: user_id,

: request_id,

: type_id,

: delivery_method_id,

: response_id,

: notif_date,

: notif_user,

: acs_permission.permission_p(notification_requests.object_id, !>>>!notification_requests.user_id, 'read') as still_valid_p

: 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 (notif_date is null or notif_date < current_timestamp)

: and interval_id = :interval_id

Deprecate oacs_util::vars_to_ns_set: modern ns_set idioms make this proc obsolete

  1. … 3 more files in changeset.
Notification request cleanup refactoring

One of the most expensive operations in large site is the cleanup for

notification_requests in situations, where the user has lost

permissions on an object, on which the user wanted to receive

notifications. This check was performed previously in

notification::sweep::cleanup_notifications via a permission check over

all notification requests, which can be very costly on large

sites. This change moves this cleanup into the actual notification

sending, where the permissions have to be sent anyhow.

Fix typo in comment

When sending a notification on behalf of a person, if the system is not configured to process replies to notification, do not set the reply-to address to anything different than the sender

reduce public footprint

mark private functions as private

  1. … 9 more files in changeset.
Remove colon that gets confused as a bind variable

Solve a potential issue when one would cleanup "dynamic" notification requests: this was done directly on the table and could therefore leave dangling acs_objects around

- cleanup all acs_objects of type 'notification_request' that do not have a corresponding entry in the table (~35000 downstream)

- embed logic of delete_dynamic_requests query inside select_invalid_request_ids query, as there the deletion is done properly

  1. … 2 more files in changeset.
Rewrite idiom to be portable (limit is psql only)

prefer "ns_conn isconnected" over "ad_conn isconnected", since the latter might not notice changes in the connect state

  1. … 18 more files in changeset.
improve spelling: move closer to the linux documentation recommendations

  1. … 9 more files in changeset.
fix an at lease 11 year old bug... not sure, why this was not discovered earlier

Whitespace cleanup

use dot instead of colon as separator between package name and cache key to ease readability

  1. … 10 more files in changeset.
acs::per_thread_cache: standardize per-thread caching

- added per-thread cache based on namespaced Tcl variables.

- use per-thread-cache on several occasions

- bump version number of acs-tcl to 5.10.0d34

  1. … 14 more files in changeset.
Rename string_truncate and string_truncate_middle to comply with OpenACS naming convention, create deprecated wrappers, replace occurrences

As string_truncate_middle was defined in xotcl-request-monitor, bring it to acs-tcl instead

  1. … 11 more files in changeset.