Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-5016

Redo reorganise call

XMLWordPrintable

    • High
    • Hide
      7.31.1: Fix reorganize worker
      7.30.0: T5Memory: replaced reorganize with export/import for better processes
      Show
      7.31.1: Fix reorganize worker 7.30.0: T5Memory: replaced reorganize with export/import for better processes

      Problem

      Currently reorganise call is not as good as it can be.

      Solution

      To try to prevent that we can do export import of problematic memory instead

      To do so we will:

      1. Count segments in TM
      2. Export tm as TMX without stripping protected content
      3. Clone tm with "reorganise.{datetime}.before-flush" suffix
      4. flush tm
      5. clone it again with "reorganise.{datetime}.after-flush" suffix
      6. Count segments in TMX export
        1. If segment count is lower, abort and log an error
      7. Place tmx into folder with languageresource id and date as name to have a backup and a way to delete it when no longer needed
      8. import tmx into new next memory as is (no protection needed as it is there already)
      9. Count segments in new TM
        1. If segment count is lower log an error
      10. Place new TM in specific data of language resource instead of broken one
      11. delete old tm from t5memory

      Create new cron job to delete backup memories older then 10 days

            sanya@mittagqi.com Sanya Mikhliaiev
            sanya@mittagqi.com Sanya Mikhliaiev
            Leon Kiz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: