Updated dataset cleanup scripts to use eggs lib.

This commit is contained in:
Nate Coraor
2008-04-18 13:53:15 +00:00
parent 04127ff3d5
commit 1d5f59a3c3
4 changed files with 13 additions and 22 deletions
+7 -1
View File
@@ -3,6 +3,12 @@
import sys, os, time, ConfigParser
from datetime import datetime, timedelta
from optparse import OptionParser
new_path = [ os.path.join( os.getcwd(), "lib" ) ]
new_path.extend( sys.path[1:] ) # remove scripts/ from the path
sys.path = new_path
from galaxy import eggs
import galaxy.model.mapping
import pkg_resources
@@ -279,4 +285,4 @@ class CleanupDatasetsApplication( object ):
self.model = galaxy.model.mapping.init( self.file_path, self.database_connection, engine_options={}, create_tables=False )
if __name__ == "__main__":
main()
main()
@@ -1,9 +1,4 @@
#!/bin/sh
# This script must be executed from the $UNIVERSE_HOME directory
# e.g., sh ./scripts/cleanup_datasets/purge_delete_userless_histories.sh
. ./scripts/get_python.sh
. ./setup_paths.sh
$GALAXY_PYTHON ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -2 $@ >> ./scripts/cleanup_datasets/delete_userless_histories.log
cd `dirname $0`/../..
python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -2 $@ >> ./scripts/cleanup_datasets/delete_userless_histories.log
+2 -7
View File
@@ -1,9 +1,4 @@
#!/bin/sh
# This script must be executed from the $UNIVERSE_HOME directory
# e.g., sh ./scripts/cleanup_datasets/purge_datasets.sh
. ./scripts/get_python.sh
. ./setup_paths.sh
$GALAXY_PYTHON ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -6 -r $@ >> ./scripts/cleanup_datasets/purge_datasets.log
cd `dirname $0`/../..
python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -6 -r $@ >> ./scripts/cleanup_datasets/purge_datasets.log
+2 -7
View File
@@ -1,9 +1,4 @@
#!/bin/sh
# This script must be executed from the $UNIVERSE_HOME directory
# e.g., sh ./scripts/cleanup_datasets/purge_histories.sh
. ./scripts/get_python.sh
. ./setup_paths.sh
$GALAXY_PYTHON ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -4 -r $@ >> ./scripts/cleanup_datasets/purge_histories.log
cd `dirname $0`/../..
python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -4 -r $@ >> ./scripts/cleanup_datasets/purge_histories.log