diff options
author | Michael DeHaan <mdehaan@redhat.com> | 2008-01-15 18:04:57 -0500 |
---|---|---|
committer | Michael DeHaan <mdehaan@redhat.com> | 2008-01-15 18:04:57 -0500 |
commit | 41c2855da8dad5b6dfb0983fdbbc46fab25fe1df (patch) | |
tree | 9ce4000c5ad591566dabf217c97bbb07dab5cd39 /func/overlord | |
parent | f5a6bfd4e4c2750ad221247eb31f3e8ff73edeec (diff) | |
download | func-41c2855da8dad5b6dfb0983fdbbc46fab25fe1df.tar.gz func-41c2855da8dad5b6dfb0983fdbbc46fab25fe1df.tar.xz func-41c2855da8dad5b6dfb0983fdbbc46fab25fe1df.zip |
Make the --forks option also use storage that is not homedir based.
Diffstat (limited to 'func/overlord')
-rw-r--r-- | func/overlord/forkbomb.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/func/overlord/forkbomb.py b/func/overlord/forkbomb.py index 1ff529d..c30cc9e 100644 --- a/func/overlord/forkbomb.py +++ b/func/overlord/forkbomb.py @@ -22,7 +22,7 @@ import tempfile import fcntl DEFAULT_FORKS = 4 -DEFAULT_CACHE_DIR = "~/.func" +DEFAULT_CACHE_DIR = "/var/lib/func" def __get_storage(dir): """ @@ -31,7 +31,7 @@ def __get_storage(dir): dir = os.path.expanduser(dir) if not os.path.exists(dir): os.makedirs(dir) - return tempfile.mktemp(suffix='', prefix='tmp', dir=dir) + return tempfile.mktemp(suffix='', prefix='asynctmp', dir=dir) def __access_buckets(filename,clear,new_key=None,new_value=None): """ @@ -133,7 +133,7 @@ def batch_run(pool,callback,nforks=DEFAULT_FORKS,cachedir=DEFAULT_CACHE_DIR): if nforks <= 1: # modulus voodoo gets crazy otherwise and bad things happen nforks = 2 - shelf_file = __get_storage("~/.func") + shelf_file = __get_storage(cachedir) __access_buckets(shelf_file,True,None) buckets = __bucketize(pool, nforks) # print "DEBUG: buckets: %s" % buckets |