First stage porting torrent transport to new transorts

This commit is contained in:
Jedrzej Nowak 2015-10-08 09:41:35 +02:00
parent 21aa22cff3
commit 29b859aace
3 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,14 @@
id: transport_torrent
input:
name:
schema: str!
value: torrent
location_id:
schema: str
value:
reverse: True
is_own: False
transports_id:
schema: str
value:
is_emit: False

View File

@ -0,0 +1 @@
../../../solar/solar/core/transports/helpers/solar_torrent.py

View File

@ -117,7 +117,7 @@ class TorrentSyncTransport(SyncTransport):
to_get = ["%s|%s" % (os.path.abspath(os.path.join(x[2], '..')), x[1]) for x in torrents] to_get = ["%s|%s" % (os.path.abspath(os.path.join(x[2], '..')), x[1]) for x in torrents]
get_args = ';'.join(to_get) get_args = ';'.join(to_get)
cmd = ['/usr/bin/python', cmd = ['/usr/bin/python',
'/vagrant/solar/solar/core/transports/helpers/solar_torrent.py', '/var/tmp/solar_torrent.py',
'g', 'g',
'"%s"' % get_args] '"%s"' % get_args]
self.other.run(resource, *cmd, use_sudo=use_sudo) self.other.run(resource, *cmd, use_sudo=use_sudo)