Sanja pavlovic has uploaded a new change for review. https://gerrit.wikimedia.org/r/63390
Change subject: Patch for worker.py. It checks for external programs existence in the initialization part. ...................................................................... Patch for worker.py. It checks for external programs existence in the initialization part. Left to be done/discuss is what to do with checks that already exist, because they are now superfluous. Change-Id: I3f7fafa6d2813931bf328bba6c519029ea412c99 --- M xmldumps-backup/worker.py 1 file changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/dumps refs/changes/90/63390/1 diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py index 08c3816..8ac6535 100644 --- a/xmldumps-backup/worker.py +++ b/xmldumps-backup/worker.py @@ -4187,6 +4187,37 @@ else: config = WikiDump.Config() + try: + if (not exists( config.php ) ): + raise BackupError("php command %s not found" % config.php) + elif (not exists( config.mysql ) ): + raise BackupError("mysql command %s not found" % config.mysql) + elif (not exists( config.mysqldump ) ): + raise BackupError("mysqldump command %s not found" % config.mysqldump) + elif (not exists( config.head ) ): + raise BackupError("head command %s not found" % config.head) + elif (not exists( config.checkforbz2footer ) ): + raise BackupError("checkforbz2footer command %s not found" % config.checkforbz2footer) + elif (not exists( config.tail ) ): + raise BackupError("tail command %s not found" % config.tail) + elif (not exists( config.grep ) ): + raise BackupError("grep command %s not found" % config.grep) + elif (not exists( config.gzip ) ): + raise BackupError("gzip command %s not found" % config.gzip) + elif (not exists( config.bzip2 ) ): + raise BackupError("bzip2 command %s not found" % config.bzip2) + elif (not exists( config.writeuptopageid ) ): + raise BackupError("writeuptopageid command %s not found" % config.writeuptopageid) + elif (not exists( config.recompressxml ) ): + raise BackupError("recompressxml command %s not found" % config.recompressxml) + elif (not exists( config.sevenzip ) ): + raise BackupError("7zip command %s not found" % config.sevenzip) + elif (not exists( config.cat ) ): + raise BackupError("cat command %s not found" % config.cat) + except BackupError, e: + sys.stderr.write("%s. Exiting.\n" % e) + sys.exit(1) + if dryrun or chunkToDo or (jobRequested and not restart) or cutoff: locksEnabled = False else: -- To view, visit https://gerrit.wikimedia.org/r/63390 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3f7fafa6d2813931bf328bba6c519029ea412c99 Gerrit-PatchSet: 1 Gerrit-Project: operations/dumps Gerrit-Branch: ariel Gerrit-Owner: Sanja pavlovic <pavlovic.sanja...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits