AnsweredAssumed Answered

Serious With Script in Alfresco !

Question asked by vinaxwater on Jul 2, 2009
Latest reply on Aug 13, 2009 by mikeh
I have a file script for Run Action >> Execute a script :


   var fileOutput = space.childByNamePath("fileOutput.txt");
   if (fileOutput == null) {
      fileOutput = space.createFile("fileOutput.txt");
   }
   
   var query = "TYPE:\"{http://www.alfresco.org/model/content/1.0}person\"";
   var Results = search.luceneSearch(query);
   
        for ( var i = 0; i < Results.length; i++) {
         var pers = Results[i].properties["cm:userName"];
              fileOutput.content = fileOutput.content + "\r\n" + pers;
       }

That code is get all Users in My Alfresco System write into fileOutput.txt. I have 500 Users in System Alfresco When I run that file script Alfresco create a file fileOutput.txt, at the same time system create file .bin in folder "alf_data/30/06/14/15" (it's mean script run in 14h15m), i have 500 user will create 500 file .bin in that folder  :shock: . If in case script not correct i repair it and run again, I can run 20 time for this script with 500 user in system when i have 500x20 file .bin created.

WHY I DELETED FILE fileOutput.txt BUT FILES .bin IN FOLDER NOT DELETE ??? IF IT'S NOT DELETE FILE .bin THAT SERIOUS BECAUSE IN 1H I USED 30GB HDD AND MY SYSTEM DIE WITH HDD FULL :shock:

Regards and Thanks
vinaxwater

Outcomes