Index: branches/ariel/xmldumps-backup/worker.py |
— | — | @@ -1489,6 +1489,7 @@ |
1490 | 1490 | return(XmlStub.listFiles(self, runner, unnumbered=True)) |
1491 | 1491 | |
1492 | 1492 | def run(self, runner): |
| 1493 | + errorresult=0 |
1493 | 1494 | if (self._chunks): |
1494 | 1495 | files = XmlStub.listFiles(self,runner) |
1495 | 1496 | outputFileList = self.listFiles(runner) |
— | — | @@ -1510,7 +1511,9 @@ |
1511 | 1512 | recombinePipeline = [ recombineCommand ] |
1512 | 1513 | series = [ recombinePipeline ] |
1513 | 1514 | result = runner.runCommand([ series ], callbackTimed=self.progressCallback, callbackTimedArg=runner, shell = True) |
1514 | | - return result |
| 1515 | + if result: |
| 1516 | + errorresult = result |
| 1517 | + return errorresult |
1515 | 1518 | |
1516 | 1519 | class XmlLogging(Dump): |
1517 | 1520 | """ Create a logging dump of all page activity """ |
— | — | @@ -1871,6 +1874,7 @@ |
1872 | 1875 | return(XmlDump.listFiles(self, runner, unnumbered=True)) |
1873 | 1876 | |
1874 | 1877 | def run(self, runner): |
| 1878 | + errorresult=0 |
1875 | 1879 | if (self._chunks): |
1876 | 1880 | files = XmlDump.listFiles(self,runner) |
1877 | 1881 | outputFileList = self.listFiles(runner) |
— | — | @@ -1892,7 +1896,9 @@ |
1893 | 1897 | recombinePipeline = [ recombineCommand ] |
1894 | 1898 | series = [ recombinePipeline ] |
1895 | 1899 | result = runner.runCommand([ series ], callbackTimed=self.progressCallback, callbackTimedArg=runner, shell = True) |
1896 | | - return result |
| 1900 | + if result: |
| 1901 | + errorresult = result |
| 1902 | + return errorresult |
1897 | 1903 | |
1898 | 1904 | class BigXmlDump(XmlDump): |
1899 | 1905 | """XML page dump for something larger, where a 7-Zip compressed copy |
— | — | @@ -2001,6 +2007,7 @@ |
2002 | 2008 | return(XmlRecompressDump.listFiles(self, runner, unnumbered=True)) |
2003 | 2009 | |
2004 | 2010 | def run(self, runner): |
| 2011 | + errorresult = 0 |
2005 | 2012 | if (self._chunks): |
2006 | 2013 | files = XmlRecompressDump.listFiles(self,runner) |
2007 | 2014 | outputFileList = self.listFiles(runner) |
— | — | @@ -2022,7 +2029,9 @@ |
2023 | 2030 | recombinePipeline = [ recombineCommand ] |
2024 | 2031 | series = [ recombinePipeline ] |
2025 | 2032 | result = runner.runCommand([ series ], callbackTimed=self.progressCallback, callbackTimedArg=runner, shell = True) |
2026 | | - return result |
| 2033 | + if result: |
| 2034 | + errorresult = result |
| 2035 | + return errorresult |
2027 | 2036 | |
2028 | 2037 | class AbstractDump(Dump): |
2029 | 2038 | """XML dump for Yahoo!'s Active Abstracts thingy""" |
— | — | @@ -2117,6 +2126,7 @@ |
2118 | 2127 | return(AbstractDump.listFiles(self,runner, unnumbered = True)) |
2119 | 2128 | |
2120 | 2129 | def run(self, runner): |
| 2130 | + errorresult = 0 |
2121 | 2131 | if (self._chunks): |
2122 | 2132 | files = AbstractDump.listFiles(self,runner) |
2123 | 2133 | outputFileList = self.listFiles(runner) |
— | — | @@ -2137,7 +2147,9 @@ |
2138 | 2148 | recombinePipeline = [ recombineCommand ] |
2139 | 2149 | series = [ recombinePipeline ] |
2140 | 2150 | result = runner.runCommand([ series ], callbackTimed=self.progressCallback, callbackTimedArg=runner, shell = True) |
2141 | | - return result |
| 2151 | + if result: |
| 2152 | + errorresult = result |
| 2153 | + return errorresult |
2142 | 2154 | |
2143 | 2155 | class TitleDump(Dump): |
2144 | 2156 | """This is used by "wikiproxy", a program to add Wikipedia links to BBC news online""" |
— | — | @@ -2146,11 +2158,11 @@ |
2147 | 2159 | # try this initially and see how it goes |
2148 | 2160 | maxretries = 3 |
2149 | 2161 | query="select page_title from page where page_namespace=0;" |
2150 | | - error = runner.dbServerInfo.saveSql(query, runner.dumpDir.publicPath("all-titles-in-ns0.gz")) |
| 2162 | + error = runner.saveSql(query, runner.dumpDir.publicPath("all-titles-in-ns0.gz")) |
2151 | 2163 | while (error and retries < maxretries): |
2152 | 2164 | retries = retries + 1 |
2153 | 2165 | time.sleep(5) |
2154 | | - error = runner.dbServerInfo.saveSql(query, runner.dumpDir.publicPath("all-titles-in-ns0.gz")) |
| 2166 | + error = runner.saveSql(query, runner.dumpDir.publicPath("all-titles-in-ns0.gz")) |
2155 | 2167 | return error |
2156 | 2168 | |
2157 | 2169 | def listFiles(self, runner): |