Uploaded image for project: 'CMS'
  1. CMS
  2. CMS-11641

Startup action in the demo should index in the script and be in maintenance mode during this time

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.7.1, 4.8.0
    • None
    • None
    • None
    • 4.8.0 M1

      1) Like the demo.nightly startup action, the global indexation should be done by the script to be serialized with the modification

      2) During all these schedulable, all should be in maintenance mode
      Can be using the dedicated param (no custom message)
      or with the following code (custom message)

              RunMode oldMode = null;
              if (Boolean.TRUE.equals(maintenance))
              {
                  oldMode = RuntimeServlet.getRunMode();
                  
                  if (oldMode != RunMode.MAINTENANCE)
                  {
                      RuntimeServlet.setMaintenanceStatus(MaintenanceStatus.FORCED, new ForcedMainteanceInformations("MESSAGE EN PLUSIEURS LANGUES", null, ZonedDateTime.now()));
                      RuntimeServlet.setRunMode(RunMode.MAINTENANCE);
                  }
              }
              
              try
              {
                  APPEL DE LA FONCTION QUI BOSSE
              }
              finally 
              {
                  if (Boolean.TRUE.equals(maintenance) && oldMode != RunMode.MAINTENANCE)
                  {
                      RuntimeServlet.setRunMode(oldMode);
                      RuntimeServlet.setMaintenanceStatus(MaintenanceStatus.NONE, null);
                  }
              }
      

            laurence Laurence Aumeunier
            raphael Raphaël Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: