use cleanupLostAttachments

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SIG
    Junior Member
    • Mar 2020
    • 6

    use cleanupLostAttachments

    Hello,

    Has somebody used cleanupLostAttachments with Orphans option in cleanup job?
    I tried it and it makes "too much" clean.
    If i upload a custom logo in "preferences" screen (to be viewed at login and in the upper bar), the logo wil be added to attachment table with type "Settings". Next cleaning will clean it after my delay of days.
    'OR' => [
    [
    'parentId' => null,
    'parentType!=' => null,
    'relatedType=' => null,
    ],
    [
    'parentType' => null, (for companyLogo it is null)
    'relatedId' => null, (for companyLogo it is null)
    'relatedType!=' => null, (for companyLogo it is settings)
    ]
    Somebody experienced the same problem? Maybe i missed something. Any idea welcome.
    Maybe we customized something wrong :-/
  • yuri
    Member
    • Mar 2014
    • 8455

    #2
    Hi,

    This feature is experimental yet, not documented. I need to fix all such issues. Please let me know if you face other problems besides with the logo.
    Last edited by yuri; 04-15-2020, 06:19 AM.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8455

      #3
      Here's the fix: https://github.com/espocrm/espocrm/c...18d676b657e33b

      You can see what attachments are considered as orphan at Administration > Attachments (in Data panel) > select text filter 'Orphan' (dropdown in the left of the text search input). You can manually remove them from there.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • SIG
        Junior Member
        • Mar 2020
        • 6

        #4
        Hello yurikuzn,
        Yes, i know it is experimental but i wanted to know if someone had tried it this way. I've done a custom job for our needs with some restrictions in emails to be deleted for example. Now i wanted to gain more disk space deleting orphans lines (well the attachments on the disk pdf jpeg and so on).
        Thanks for the fix.
        I think i will update with it but also restrict to only emails attachments (where we have our problem when trying to send emails more than one time).
        Thanks again

        Comment

        • FeliciaWhite
          Junior Member
          • Apr 2020
          • 1

          #5
          Originally posted by yurikuzn
          Here's the fix: https://github.com/espocrm/espocrm/c...18d676b657e33b/McDVOICE

          You can see what attachments are considered as orphan at Administration > Attachments (in Data panel) > select text filter 'Orphan' (dropdown in the left of the text search input). You can manually remove them from there.
          Thank you so much your site has nice content
          Last edited by FeliciaWhite; 04-24-2020, 12:01 PM.

          Comment

          Working...