Skip to content
Snippets Groups Projects
Commit e0bf4de7 authored by joe's avatar joe
Browse files

completing separation of the state machines for moving and clearing

parent 96ba3070
No related branches found
No related tags found
1 merge request!1Add blogs removal functions.
......@@ -166,7 +166,10 @@ def process_rm_data(blog_id, value, progress):
return 'rm_db'
class NoblogsMoveStateMachine(state.StateMachine):
class NoblogsStateMachine(state.StateMachine):
dry_run = None
class NoblogsMoveStateMachine(NoblogsStateMachine):
states = {
'error': state.nop,
......@@ -176,9 +179,8 @@ class NoblogsMoveStateMachine(state.StateMachine):
'done': state.nop,
}
dry_run = False
class NoblogsCleanStateMachine(state.StateMachine):
class NoblogsCleanStateMachine(NoblogsStateMachine):
states = {
'error': state.nop,
......@@ -234,7 +236,7 @@ use the `--recover' option.
if opts.clean:
statemachine = NoblogsCleanStateMachine
else:
statemachine = NoblogsStateMachine
statemachine = NoblogsMoveStateMachine
inputfd = None
if not opts.recover:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment