File tree Expand file tree Collapse file tree 3 files changed +30
-0
lines changed
Expand file tree Collapse file tree 3 files changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -219,3 +219,23 @@ def test_clean_up_jobs(tmp_path):
219219 assert job_ids == {job_id2 , archive_job_id }
220220
221221
222+ def test_vacuum ():
223+ with closing (ApsisService ()) as inst :
224+ inst .create_db ()
225+ inst .write_cfg ()
226+ inst .start_serve ()
227+ inst .wait_for_serve ()
228+
229+ client = inst .client
230+
231+ res = client .schedule_adhoc ("now" , {
232+ "program" : {
233+ "type" : "apsis.program.internal.vacuum.VacuumProgram" ,
234+ },
235+ })
236+ res = inst .wait_run (res ["run_id" ])
237+ assert res ["state" ] == "success"
238+ meta = res ["meta" ]["program" ]
239+ assert meta ["time" ] > 0
240+
241+
Original file line number Diff line number Diff line change 1+ params : [label, age]
2+
3+ program :
4+ type : apsis.program.internal.archive.ArchiveProgram
5+ age : " {{ age }}"
6+ path : " /home/alex/dev/apsis/test/manual/procstar/archive/{{ label }}.db"
7+ count : 1000000
Original file line number Diff line number Diff line change 1+ program :
2+ type : apsis.program.internal.vacuum.VacuumProgram
3+
You can’t perform that action at this time.
0 commit comments