mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-09 06:22:38 +00:00
macfuse: increase default timeout in ui launched mounts
when an operation takes 'too long', on 10.4 the user gets a dialog about the problem with a 'force eject / keep trying' choice. on 10.5 the fuse system seems to summarily unmount the drive. this showed up in 10.5 testing because the time to open() a file depended upon the size of the file, and an 8Mb test file took long enough for the node to download that the open() call didn't respond within 60s and fuse spontaneously ejected the drive, quitting the plugin (and cancelling the download). this changes the fuse options passed to the plugin by the ui when the 'mount filesystem' window is used. command line users should check out the '-odaemon_timeout=...' option. this changes the default timeout from 60s to 300s (5min) for ui launched plugins. this will be addressed in a deeper manner at a later date, with a more advanced fuse subsystem which can interleave open()/read() with the actual download of the file, only blocking when data is not downloaded yet.
This commit is contained in:
parent
6cac9c479c
commit
33c7733e35
@ -20,6 +20,7 @@ from allmydata.gui.confwiz import ConfWizApp, ACCOUNT_PAGE, DEFAULT_SERVER_URL
|
||||
from allmydata.uri import NewDirectoryURI
|
||||
import amdicon
|
||||
|
||||
DEFAULT_FUSE_TIMEOUT = 300
|
||||
|
||||
TRY_TO_INSTALL_TAHOE_SCRIPT = True
|
||||
TAHOE_SCRIPT = '''#!/bin/bash
|
||||
@ -331,13 +332,19 @@ class MountPanel(wx.Panel):
|
||||
bin_path = sys.executable[:-6] + 'Allmydata Tahoe'
|
||||
log.msg('%r exists: %r' % (bin_path, os.path.exists(bin_path),))
|
||||
|
||||
foptions = []
|
||||
foptions.append('-ovolname=%s' % (cap_name,))
|
||||
|
||||
timeout = DEFAULT_FUSE_TIMEOUT
|
||||
# [ ] TODO: make this configurable
|
||||
if timeout:
|
||||
foptions.append('-odaemon_timeout=%d' % (timeout,))
|
||||
|
||||
icns_path = os.path.join(self.app.basedir, 'private', cap_name+'.icns')
|
||||
if os.path.exists(icns_path):
|
||||
icon_arg = ['-ovolicon=%s' % (icns_path,)]
|
||||
else:
|
||||
icon_arg = []
|
||||
foptions.append('-ovolicon=%s' % (icns_path,))
|
||||
|
||||
command = [bin_path, 'fuse', cap_name] + icon_arg + [mountpoint]
|
||||
command = [bin_path, 'fuse', cap_name] + foptions + [mountpoint]
|
||||
log.msg('spawning command %r' % (command,))
|
||||
proc = subprocess.Popen(command,
|
||||
cwd=self.app.basedir,
|
||||
|
Loading…
Reference in New Issue
Block a user