drop-upload: rename 'start' method to 'startService', which is what you're supposed to use to start a Service. refs #1429

This commit is contained in:
david-sarah 2011-08-09 20:03:45 -07:00
parent f157b73367
commit 10ee22f50e
3 changed files with 4 additions and 3 deletions

View File

@ -432,7 +432,7 @@ class Client(node.Node, pollmixin.PollMixin):
from allmydata.frontends import drop_upload
s = drop_upload.DropUploader(self, upload_dircap, local_dir_utf8)
s.setServiceParent(self)
s.start()
s.startService()
except Exception, e:
self.log("couldn't start drop-uploader: %r", args=(e,))
else:

View File

@ -59,7 +59,8 @@ class DropUploader(service.MultiService):
mask = inotify.IN_CLOSE_WRITE | inotify.IN_MOVED_TO | inotify.IN_ONLYDIR
self._notifier.watch(self._local_path, mask=mask, callbacks=[self._notify])
def start(self):
def startService(self):
service.MultiService.startService(self)
d = self._notifier.startReading()
self._stats_provider.count('drop_upload.dirs_monitored', 1)
return d

View File

@ -69,7 +69,7 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin):
self.upload_dircap = n.get_uri()
self.uploader = DropUploader(self.client, self.upload_dircap, self.local_dir.encode('utf-8'),
inotify=self.inotify)
return self.uploader.start()
return self.uploader.startService()
d.addCallback(_made_upload_dir)
# Write something short enough for a LIT file.