[MSG-4] Too many messages render Magnolia temporarily unusable Created: 12/Oct/23 Updated: 29/Jan/24 |
|
| Status: | Accepted |
| Project: | Messages |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Marc Johnen | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | dx-core-6.3 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: | |
| Acceptance criteria: |
Empty
|
| Documentation update required: |
Yes
|
| Date of First Response: | |
| Epic Link: | Repository hygiene |
| Description |
| Comments |
| Comment by Jonathan Ayala [ 17/Oct/23 ] |
|
Hi Mark, Thanks for reporting your feedback. Meanwhile the fix is implemented, you could schedule a cron job so it executes the command that cleans messages. Find below a sample of script that removes messages for a given user. import info.magnolia.context.MgnlContext; import javax.jcr.Session; import javax.jcr.Node; import javax.jcr.NodeIterator; def removeMessages(username) { try { Session session = MgnlContext.getJCRSession("messages"); path = "/" + username; Node usertree = session.getNode(path); NodeIterator childrenIterator = usertree.getNodes(); while (childrenIterator.hasNext()) { Node node = childrenIterator.nextNode(); path = node.getPath(); println "about to remove ${path} item"; session.removeItem(path); } session.save(); println "messages of ${username} removed"; } catch (Exception e) { println e; } } //example of usage removeMessages("superuser"); Hope that helps. Don't hesitate in opening a support ticket in case you need further support. Regards, |
| Comment by Marc Johnen [ 17/Oct/23 ] |
|
Thank you |