mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-29 03:16:22 -05:00
Renaming cleanup flag to refresh_cleanup. Updating refresh progress test.
This commit is contained in:
parent
a3321cf2fa
commit
9cba8c7f6c
3 changed files with 6 additions and 5 deletions
|
|
@ -492,7 +492,7 @@ async def refresh_files(paths: List[pathlib.Path] = None, send_events: bool = Tr
|
|||
Events.send_global_refresh_indexing_completed()
|
||||
|
||||
# Cleanup any outdated file data.
|
||||
with flags.cleanup:
|
||||
with flags.refresh_cleanup:
|
||||
await apply_refresh_cleanup()
|
||||
if send_events:
|
||||
Events.send_global_after_refresh_completed()
|
||||
|
|
@ -862,15 +862,15 @@ def get_refresh_progress():
|
|||
results = dict(curs.fetchone())
|
||||
|
||||
status = dict(
|
||||
cleanup=flags.cleanup.is_set(),
|
||||
counted_files=REFRESH.get('counted_files', 0),
|
||||
counting=flags.refresh_counting.is_set(),
|
||||
discovery=flags.refresh_discovery.is_set(),
|
||||
indexed=results['indexed'],
|
||||
indexing=flags.refresh_indexing.is_set(),
|
||||
modeled=results['modeled'],
|
||||
modeling=flags.refresh_modeling.is_set(),
|
||||
cleanup=flags.refresh_cleanup.is_set(),
|
||||
refreshing=flags.refreshing.is_set(),
|
||||
counted_files=REFRESH.get('counted_files', 0),
|
||||
total_file_groups=results['total_file_groups'],
|
||||
unindexed=results['unindexed'],
|
||||
)
|
||||
|
|
|
|||
|
|
@ -579,7 +579,8 @@ def test_get_refresh_progress(test_client, test_session):
|
|||
assert 'modeled' in progress
|
||||
assert 'modeling' in progress
|
||||
assert 'refreshing' in progress
|
||||
assert 'total_files' in progress
|
||||
assert 'counted_files' in progress
|
||||
assert 'total_file_groups' in progress
|
||||
assert 'unindexed' in progress
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ refresh_counting = Flag('refresh_counting')
|
|||
refresh_discovery = Flag('refresh_discovery')
|
||||
refresh_modeling = Flag('refresh_modeling')
|
||||
refresh_indexing = Flag('refresh_indexing')
|
||||
cleanup = Flag('cleanup')
|
||||
refresh_cleanup = Flag('refresh_cleanup')
|
||||
|
||||
# The global refresh has been performed. This is False on a fresh instance of WROLPi.
|
||||
refresh_complete = Flag('refresh_complete', store_db=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue