Skip to content

Commit

Permalink
Update dump.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jal347 committed Jan 26, 2023
1 parent 5c5e424 commit 96a0ee7
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/hub/dataload/sources/uniprot/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ class UniprotDumper(FTPDumper):


def prepare_client(self):
# FTP side
self.client = FTP(self.FTP_HOST, timeout=self.FTP_TIMEOUT)
self.client.login(self.FTP_USER, self.FTP_PASSWD)
if self.CWD_DIR:
self.client.cwd(self.CWD_DIR)
super().prepare_client(self)
# adding keepalive so the client socket does not disconnect while the data socket is downloading
self.client.sock.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
self.client.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, 75)
self.client.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, 60)
Expand Down

0 comments on commit 96a0ee7

Please sign in to comment.