| CODENOTIFIER | HelpYou are not signed inSign in |
Project: PUNKsearch
Revision: 536
Author: ysoldak
Date: 24 Aug 2008 18:00:49
Changes:Dumping status to temp directory.
File was also renamed, now it is punksearch-crawl.status
| ... | ...@@ -18,7 +18,6 @@ | |
| 18 | 18 | import java.util.TimerTask; |
| 19 | 19 | |
| 20 | 20 | import org.apache.commons.io.FileUtils; |
| 21 | import org.punksearch.common.PunksearchFs; | |
| 22 | 21 | import org.punksearch.common.PunksearchProperties; |
| 23 | 22 | import org.punksearch.crawler.HostCrawler; |
| 24 | 23 | import org.punksearch.crawler.NetworkCrawler; |
| ... | ...@@ -64,7 +63,7 @@ | |
| 64 | 63 | |
| 65 | 64 | private class StatusDumpTask extends TimerTask { |
| 66 | 65 | |
| 67 | public static final String STATUS_FILENAME = "crawler.status"; | |
| 66 | public static final String STATUS_FILENAME = "punksearch-crawl.status"; | |
| 68 | 67 | |
| 69 | 68 | public void run() { |
| 70 | 69 | List<HostCrawler> threads = NetworkCrawler.getInstance().getThreads(); |
| ... | ...@@ -88,7 +87,7 @@ | |
| 88 | 87 | dump += thread.getName() + " : " + status + " : " + thread.getCrawledHosts().size() + "\n"; |
| 89 | 88 | } |
| 90 | 89 | try { |
| 91 | String path = PunksearchFs.resolve(STATUS_FILENAME); | |
| 90 | String path = System.getProperty("java.io.tmpdir") + File.separator + STATUS_FILENAME; | |
| 92 | 91 | FileUtils.writeStringToFile(new File(path), dump); |
| 93 | 92 | } catch (IOException e) { |
| 94 | 93 | System.err.println("Can't write crawler status"); |