我有一個超過一年的快照的聲納項目。問題是,舊的主機沒有被刪除,這(我認爲)導致SonarQube非常慢。我的數據庫清理器配置將所有設置設置爲默認值。在Sonar中未刪除快照
當我運行從gradle這個任務聲納亞軍,同時也輸出這樣的:
...
11:23:18.072 DEBUG - Post-jobs : [email protected] -> org.sonar[email protected]140401 -> org.sona[email protected]c5f5c2 -> [email protected]
11:23:18.072 INFO - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob
11:23:18.503 INFO - -> Keep one snapshot per day between 2014-09-12 and 2014-10-09
11:23:18.507 INFO - -> Keep one snapshot per week between 2013-10-11 and 2014-09-12
11:23:18.513 INFO - -> Keep one snapshot per month between 2009-10-16 and 2013-10-11
11:23:18.523 INFO - -> Delete data prior to: 2009-10-16
11:23:18.524 DEBUG - ==> Preparing: select * from projects p where p.id=?
11:23:18.524 DEBUG - ==> Parameters: 1(Long)
11:23:18.526 DEBUG - <== Total: 1
11:23:18.526 DEBUG - ==> Preparing: select * from projects where scope='PRJ' and root_id=?
11:23:18.526 DEBUG - ==> Parameters: 1(Long)
11:23:19.191 DEBUG - <== Total: 186
11:23:19.191 DEBUG - ==> Preparing: select * from projects where scope='PRJ' and root_id=?
11:23:19.191 DEBUG - ==> Parameters: 2(Long)
11:23:19.192 DEBUG - <== Total: 0
...
11:23:19.966 DEBUG - ==> Preparing: select * from projects where scope='PRJ' and root_id=?
11:23:19.966 DEBUG - ==> Parameters: 11658(Long)
11:23:19.967 DEBUG - <== Total: 0
...
這使我相信,該項目被正確配置。但是,舊數據根本不會被刪除。我提高了日誌級別並查看了sonar.log文件,但我看不到任何錯誤消息。不過,我也看不到任何試圖刪除舊快照的SQL查詢。
SonarQube使用運行在同一臺服務器上的MySQL數據庫。
我運行SonarQube 4.5和2.3 SonarRunner
編輯:這裏是一個屏幕截圖(一小部分)的聲納快照頁面。
在這張截圖中,我想每週只保留1張快照。
你是說,你有比「每週一個快照,2013年10月11日和2014年9月12日之間」(例如)嗎? – 2014-10-10 08:49:23
是的。例如,我有2013年7月29日的4個快照。 – 2014-10-10 08:53:13
是否可以使用詳細標誌運行它(-X/- debug或-Dsonar.verbose = true)http://docs.codehaus.org/display/SONAR/Installing + and +配置+ SonarQube +轉輪 – 2014-10-10 09:01:08