Skip to content

Commit 411798a

Browse files
author
Tim Vaillancourt
committed
fix for oplog file delete
1 parent 5b7166d commit 411798a

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

MongoBackup/Oplog/Resolver.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@ def run(self):
5757
backup_oplog = self.backup_oplogs[host][port]
5858
if host in self.tailed_oplogs and port in self.tailed_oplogs[host]:
5959
tailed_oplog = self.tailed_oplogs[host][port]
60-
tailed_oplogs.append(tailed_oplog['file'])
60+
tailed_oplogs.append({
61+
'host': host,
62+
'port': port,
63+
'file': tailed_oplog['file']
64+
})
6165

6266
if backup_oplog['last_ts'] is None and tailed_oplog['last_ts'] is None:
6367
logging.info("No oplog changes to resolve for %s:%s" % (host, port))
@@ -86,8 +90,8 @@ def run(self):
8690

8791
for oplog_file in tailed_oplogs:
8892
try:
89-
logging.debug("Deleting tailed oplog file for %s:%s" % (host, port))
90-
os.remove(oplog_file)
93+
logging.debug("Deleting tailed oplog file for %s:%s" % (oplog_file['host'], oplog_file['port']))
94+
os.remove(oplog_file['file'])
9195
except Exception, e:
9296
logging.fatal("Deleting of tailed oplog file %s failed! Error: %s" % (tailed_oplog, e))
9397
raise e

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.0
1+
0.3.1

0 commit comments

Comments
 (0)