mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Dont upload to files.calibre-ebook.com as it no longer exists
This commit is contained in:
parent
39ebb0adab
commit
0c57ad189e
@ -312,31 +312,31 @@ def upload_to_servers(files, version): # {{{
|
||||
finally:
|
||||
os.chdir(cwd)
|
||||
|
||||
for server, rdir in {'files':'/srv/download/'}.iteritems():
|
||||
print('Uploading to server:', server)
|
||||
server = '%s.calibre-ebook.com' % server
|
||||
# Copy the generated index files
|
||||
print ('Copying generated index')
|
||||
check_call(['rsync', '-hza', '-e', 'ssh -x', '--include', '*.html',
|
||||
'--filter', '-! */', base, 'root@%s:%s' % (server, rdir)])
|
||||
# Copy the release files
|
||||
rdir = '%s%s/' % (rdir, version)
|
||||
for x in files:
|
||||
start = time.time()
|
||||
print ('Uploading', x)
|
||||
for i in range(5):
|
||||
try:
|
||||
check_call(['rsync', '-h', '-z', '--progress', '-e', 'ssh -x', x,
|
||||
'root@%s:%s'%(server, rdir)])
|
||||
except KeyboardInterrupt:
|
||||
raise SystemExit(1)
|
||||
except:
|
||||
print ('\nUpload failed, trying again in 30 seconds')
|
||||
time.sleep(30)
|
||||
else:
|
||||
break
|
||||
print ('Uploaded in', int(time.time() - start), 'seconds\n\n')
|
||||
|
||||
# for server, rdir in {'files':'/srv/download/'}.iteritems():
|
||||
# print('Uploading to server:', server)
|
||||
# server = '%s.calibre-ebook.com' % server
|
||||
# # Copy the generated index files
|
||||
# print ('Copying generated index')
|
||||
# check_call(['rsync', '-hza', '-e', 'ssh -x', '--include', '*.html',
|
||||
# '--filter', '-! */', base, 'root@%s:%s' % (server, rdir)])
|
||||
# # Copy the release files
|
||||
# rdir = '%s%s/' % (rdir, version)
|
||||
# for x in files:
|
||||
# start = time.time()
|
||||
# print ('Uploading', x)
|
||||
# for i in range(5):
|
||||
# try:
|
||||
# check_call(['rsync', '-h', '-z', '--progress', '-e', 'ssh -x', x,
|
||||
# 'root@%s:%s'%(server, rdir)])
|
||||
# except KeyboardInterrupt:
|
||||
# raise SystemExit(1)
|
||||
# except:
|
||||
# print ('\nUpload failed, trying again in 30 seconds')
|
||||
# time.sleep(30)
|
||||
# else:
|
||||
# break
|
||||
# print ('Uploaded in', int(time.time() - start), 'seconds\n\n')
|
||||
#
|
||||
# }}}
|
||||
|
||||
def upload_to_dbs(files, version): # {{{
|
||||
|
Loading…
x
Reference in New Issue
Block a user