Purge Activities
Generic purge for users/files activities.

Based on the internal gRPC API of the activity service, this flow is useful for housekeeping and maintaining activity DB size under control. Run regularly, it allows you to prune activities (either files/folders activities displayed in the right-hand panel of the interface or users notifications) on a regular basis, based on various rules :
- Updated : remove records registered before a given date. It can be combined with KeepAtLeast parameter to still make sure to keep a given number of rows, even if they were older than the purge dates (avoid empty feeds!).
- KeepMax : remove records based on a maximum number of rows.
Parameters
Name | Type | Default | Mandatory | Description |
---|---|---|---|---|
PurgeOn | select, possible values: Users (1), Files/Folders (0) | 1 | false | Purge users or files/folders activities. |
OwnerId | text | * | true | Specific user or node ID, or "*" to browse all records. |
BoxName | select, possible values: Inbox (inbox), Outbox (outbox) | inbox | false | Either Inbox (notifications received) or Outbox (user activity / file activity). |
KeepAtLeast | integer | 1 | false | Keep at least X records in the box. |
KeepMax | integer | 100 | false | Maximum number of records to be kept. |
Updated | text | {{now | date_modify "-720h" | unixEpoch}} | false | Limit to purge records registered before this date. Default value is 30 days ago (24*30 hours) |
CompactDB | boolean | true | false | For Bolt implementation, compact database after purge |
ClearBackups | boolean | false | false | After DB compaction, remove original db, otherwise keep a backup (default) |
Trigger Type
Manual
JSON Representation
{
"Label": "Purge Activities||Generic purge for users/files activities||mdi mdi-delete-sweep",
"Owner": "pydio.system.user",
"Custom": true,
"Actions": [
{
"ID": "actions.cmd.rpc",
"Label": "Purge Activities",
"Parameters": {
"method": "activity.ActivityService.PurgeActivities",
"request": "{\n \"OwnerType\": {{.JobParameters.PurgeOn}},\n \"OwnerID\": \"{{.JobParameters.OwnerId}}\",\n \"BoxName\": \"{{.JobParameters.BoxName}}\",\n \"minCount\": {{.JobParameters.KeepAtLeast}},\n \"maxCount\": {{.JobParameters.KeepMax}},\n \"updatedBeforeTimestamp\": \"{{.JobParameters.Updated}}\",\n \"CompactDB\": {{.JobParameters.CompactDB}},\n \"ClearBackups\": {{.JobParameters.ClearBackups}}\n}",
"service": "pydio.grpc.activity",
"timeout": "6h"
}
}
],
"Parameters": [
{
"Name": "PurgeOn",
"Description": "Purge users or files/folders activities.",
"Value": "1",
"Type": "select",
"JsonChoices": "{\"1\":\"Users\",\"0\":\"Files/Folders\"}"
},
{
"Name": "OwnerId",
"Description": "Specific user or node ID, or \"*\" to browse all records.",
"Value": "*",
"Mandatory": true,
"Type": "text"
},
{
"Name": "BoxName",
"Description": "Either Inbox (notifications received) or Outbox (user activity / file activity).",
"Value": "inbox",
"Type": "select",
"JsonChoices": "{\"inbox\":\"Inbox\",\"outbox\":\"Outbox\"}"
},
{
"Name": "KeepAtLeast",
"Description": "Keep at least X records in the box.",
"Value": "1",
"Type": "integer"
},
{
"Name": "KeepMax",
"Description": "Maximum number of records to be kept.",
"Value": "100",
"Type": "integer"
},
{
"Name": "Updated",
"Description": "Limit to purge records registered before this date. Default value is 30 days ago (24*30 hours)",
"Value": "{{now | date_modify \"-720h\" | unixEpoch}}",
"Type": "text"
},
{
"Name": "CompactDB",
"Description": "For Bolt implementation, compact database after purge",
"Value": "true",
"Type": "boolean"
},
{
"Name": "ClearBackups",
"Description": "After DB compaction, remove original db, otherwise keep a backup (default)",
"Value": "false",
"Type": "boolean"
}
]
}
Back to top