Il 29/03/2014 06:25, Francesco Chicchiriccò ha scritto:
On 28/03/2014 20:44, Guido Wimmel wrote:
Hi Francesco,
thanks for the information.
As far as I know, for each notification (e.g. on user creation) a
notification task is created, and for each notification task there
can be a number of task executions.
I assume when bulk deleting tasks via the Syncope console, the
corresponding task executions are deleted as well?
Exactly.
Moreover, bulk delete is also available via REST, check [1] and [2].
What if one e.g. regularly wants to delete all (maybe a large number
of) notification tasks that are older than one year?
This is currently not possible via the Syncope console and probably
not trivial using the REST services, right?
The best way to accomplish this is via a scheduled task [3] (we do
this in almost all IAM projects we're involved in): basically you can
leverage this sort of "Java" crontab to perform any operation via DAO
with Spring transactional support, e.g. exactly as the Syncope core.
Hi, sometimes, for spot tasks, I've chosen for a bash + curl script?
Best regards,
F.
HTH
Regards.
Gesendet: Freitag, 28. März 2014 um 08:39 Uhr
Von: "Francesco Chicchiriccò" <[email protected]>
An: [email protected]
Betreff: Re: cleaning up notification tasks
On 27/03/2014 19:29, Guido Wimmel wrote:
Hi,
a bit related to the recent discussion of
https://issues.apache.org/jira/browse/SYNCOPE-481 (Limit the number
of results stored for Task Exectutions):
When the notification feature is used, each notification generates
an entry in the task table, which is thus continually growing.
What would be the usual way to remove old notifications, if
necessary? Cleaning up at the database level from time to time?
Hi Guido,
the easiest way to perform this cleaning is via the admin console, by
leveraging the bulk action feature (leftmost checkbox column, available
in many data tables, then click on the blue gear on the bottom and
choose the delete icon).
Via REST, task execution removal (for any kind of task: propagation,
synchronization, scheduled, notification) can be performed (see [1] for
a complete reference for 1.1.X) as
GET /rest/task/execution/delete/{executionId} (Spring MVC)
or
DELETE /tasks/executions/{executionId} (CXF, also working in 1.2.X)
You can also enjoy a sneak peak of REST services documentation in
upcoming 1.2.X by taking a look at [2].
Consider anyway that if you don't want to store all notification task
executions you can just apply the same workaround suggested in
SYNCOPE-481 for propagation tasks: set notification trace level to
NONE,
FAILURES or SUMMARY instead of ALL (which is the default).
Hope this helps.
Regards.
[1]
https://cwiki.apache.org/confluence/display/SYNCOPE/REST+API+upgrade#RESTAPIupgrade-TaskService
[2] http://people.apache.org/~ilgrosso/wadl2html/
[3]
https://cwiki.apache.org/confluence/display/SYNCOPE/ScheduledTaskJobClass
--
Fabio Martelli
Tirasa - Open Source Excellence
http://www.tirasa.net/
Apache Syncope PMC
http://people.apache.org/~fmartelli/