Rev3502, Start fileserver to new greenlet to fix siteDownload and siteAnnounce CLI action
This commit is contained in:
parent
d5b31a5545
commit
ec05e6864a
2 changed files with 3 additions and 4 deletions
|
@ -10,7 +10,7 @@ class Config(object):
|
||||||
|
|
||||||
def __init__(self, argv):
|
def __init__(self, argv):
|
||||||
self.version = "0.6.3"
|
self.version = "0.6.3"
|
||||||
self.rev = 3501
|
self.rev = 3502
|
||||||
self.argv = argv
|
self.argv = argv
|
||||||
self.action = None
|
self.action = None
|
||||||
self.config_file = "zeronet.conf"
|
self.config_file = "zeronet.conf"
|
||||||
|
|
|
@ -325,7 +325,7 @@ class Actions(object):
|
||||||
global file_server
|
global file_server
|
||||||
from File import FileServer
|
from File import FileServer
|
||||||
file_server = FileServer("127.0.0.1", 1234)
|
file_server = FileServer("127.0.0.1", 1234)
|
||||||
file_server.start()
|
file_server_thread = gevent.spawn(file_server.start, check_sites=False)
|
||||||
|
|
||||||
site = Site(address)
|
site = Site(address)
|
||||||
|
|
||||||
|
@ -342,7 +342,6 @@ class Actions(object):
|
||||||
print "Downloading..."
|
print "Downloading..."
|
||||||
site.downloadContent("content.json", check_modifications=True)
|
site.downloadContent("content.json", check_modifications=True)
|
||||||
|
|
||||||
print on_completed.get()
|
|
||||||
print "Downloaded in %.3fs" % (time.time()-s)
|
print "Downloaded in %.3fs" % (time.time()-s)
|
||||||
|
|
||||||
|
|
||||||
|
@ -362,7 +361,7 @@ class Actions(object):
|
||||||
global file_server
|
global file_server
|
||||||
from File import FileServer
|
from File import FileServer
|
||||||
file_server = FileServer("127.0.0.1", 1234)
|
file_server = FileServer("127.0.0.1", 1234)
|
||||||
file_server.start()
|
file_server_thread = gevent.spawn(file_server.start, check_sites=False)
|
||||||
|
|
||||||
site = Site(address)
|
site = Site(address)
|
||||||
site.announce()
|
site.announce()
|
||||||
|
|
Loading…
Reference in a new issue