Deleting background tasks (such as LAR exports)

Issue

  • As an administrator, I would like to clean up the environment - therefore retrieve free space - by deleting previous exports which are no longer needed.

Environment

  • Liferay DXP 7.1

Resolution

  • Resolution A) - A method to delete previous exports on the UI
    1. Log in as admin
    2. At the Product Menu, navigate to Content / Documents and Media or any other portlet/site which supports export/import (see screenshot export_modal.png)
    3. By clicking the ellipsis menu (three dots at the top bar), navigate to Export/Import modal
    4. At Export/Current and Previous tab, select the export to be deleted
    5. At the ellipsis menu, select Clear (see screenshot export_modal2.png)
  • Note: An administrator should see the exports of other users as well on the UI, although sometimes they may not be visible due to various reasons. In such cases, a script may come in handy to discover and delete these exports which are no longer needed.
  • Resolution B) - the script method
    • The script can be ran at menu Server Administration -> Script from the UI of DXP.
    • The attached Groovy script is designed to delete background tasks (every export/import process run as background tasks as well). Indeed, it is aimed to do the same method as described above on UI.
    • It is possible to export a portlet or the whole site. The script handles both - it is only required to fill the groupId

Additional Information

  • Please note: Such custom scripts may only be applied in production at your own discretion, after thorough testing.
这篇文章有帮助吗?
0 人中有 0 人觉得有帮助