Serious With Script in Alfresco !

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2009 10:56 PM
I have a file script for Run Action >> Execute a script :
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
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
Labels:
- Labels:
-
Archive
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2009 12:58 AM
Instead of writing:
… why not try collecting your output in a temporary variable and then assigning it to the content? Otherwise, every time you update fileOutput.content, Alfresco will create a new version of your file. A new version probably means a new .bin file in your data directory.
for ( var i = 0; i < Results.length; i++) { var pers = Results[i].properties["cm:userName"]; fileOutput.content = fileOutput.content + "\r\n" + pers; }
… why not try collecting your output in a temporary variable and then assigning it to the content? Otherwise, every time you update fileOutput.content, Alfresco will create a new version of your file. A new version probably means a new .bin file in your data directory.
var content = '';for ( var i = 0; i < Results.length; i++) { var pers = Results[i].properties["cm:userName"]; content += "\r\n" + pers;}fileOutput.content += content;

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2009 04:16 AM
Thanks for reply me. I know that but i must repairing and executing file script not one time in day, i want those .bin remove when i deleted that file fileOutput.txt

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2009 04:58 AM
Hi,
orphanded content keeps in alf_data for a while:
http://wiki.alfresco.com/wiki/Content_Store_Configuration#Cleaning_up_Orphaned_Content_.28Purge.29
Cheers, jan
orphanded content keeps in alf_data for a while:
http://wiki.alfresco.com/wiki/Content_Store_Configuration#Cleaning_up_Orphaned_Content_.28Purge.29
Cheers, jan

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2009 05:50 AM
Hi,
we can go around that by adding temporary aspect to the node before deleting it.
This way, it will be completely deleted right away.
There's also a <archive> tag that we can set to false when designing our model.
This will also result with the same thing.
Cheers,
Lista.
we can go around that by adding temporary aspect to the node before deleting it.
This way, it will be completely deleted right away.
There's also a <archive> tag that we can set to false when designing our model.
This will also result with the same thing.
Cheers,
Lista.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2009 11:34 PM
Hi All,
I want disable feature create new file .bin in /alt_data when i update content because i use cifs in alfresco from url: \\serverAlfresco:8080\alfresco it's create file .bin for new version when i paste files exist :roll:
Thanks for read and Regards
I want disable feature create new file .bin in /alt_data when i update content because i use cifs in alfresco from url: \\serverAlfresco:8080\alfresco it's create file .bin for new version when i paste files exist :roll:
Thanks for read and Regards
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2009 04:14 AM
Hi All,Firstly, please start a new topic for an unrelated issue, don't tack it onto an existing one.
I want disable feature create new file .bin in /alt_data when i update content because i use cifs in alfresco from url: \\serverAlfresco:8080\alfresco it's create file .bin for new version when i paste files exist :roll:
Thanks for read and Regards
Secondly: what? Alfresco will create a new .bin file because it's a new version. It has to keep the old version in case you want to roll back. The fact the you use CIFS is not relevant.
Thanks,
Mike
