File tree Expand file tree Collapse file tree 1 file changed +7
-15
lines changed
mithril-aggregator/src/services Expand file tree Collapse file tree 1 file changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -101,10 +101,7 @@ impl AggregatorUpkeepService {
101
101
info ! ( db_upkeep_logger, "Cleaning main database" ) ;
102
102
SqliteCleaner :: new ( & main_db_connection)
103
103
. with_logger ( db_upkeep_logger. clone ( ) )
104
- . with_tasks ( & [
105
- SqliteCleaningTask :: Vacuum ,
106
- SqliteCleaningTask :: WalCheckpointTruncate ,
107
- ] )
104
+ . with_tasks ( & [ SqliteCleaningTask :: WalCheckpointTruncate ] )
108
105
. run ( ) ?;
109
106
110
107
info ! ( db_upkeep_logger, "Cleaning cardano transactions database" ) ;
@@ -218,18 +215,18 @@ mod tests {
218
215
219
216
let logs = std:: fs:: read_to_string ( & log_path) . unwrap ( ) ;
220
217
221
- assert_eq ! (
222
- logs. matches( SqliteCleaningTask :: Vacuum . log_message( ) )
223
- . count( ) ,
224
- 1 ,
225
- "Should have run only once since only the main database has a `Vacuum` cleanup"
226
- ) ;
227
218
assert_eq ! (
228
219
logs. matches( SqliteCleaningTask :: WalCheckpointTruncate . log_message( ) )
229
220
. count( ) ,
230
221
3 ,
231
222
"Should have run three times since the three databases have a `WalCheckpointTruncate` cleanup"
232
223
) ;
224
+ assert_eq ! (
225
+ logs. matches( SqliteCleaningTask :: Vacuum . log_message( ) )
226
+ . count( ) ,
227
+ 0 ,
228
+ "Upkeep operation should not include Vacuum tasks"
229
+ ) ;
233
230
}
234
231
235
232
#[ tokio:: test]
@@ -257,11 +254,6 @@ mod tests {
257
254
258
255
let logs = std:: fs:: read_to_string ( & log_path) . unwrap ( ) ;
259
256
260
- assert_eq ! (
261
- logs. matches( SqliteCleaningTask :: Vacuum . log_message( ) )
262
- . count( ) ,
263
- 0 ,
264
- ) ;
265
257
assert_eq ! (
266
258
logs. matches( SqliteCleaningTask :: WalCheckpointTruncate . log_message( ) )
267
259
. count( ) ,
You can’t perform that action at this time.
0 commit comments