Skip to content

Commit

Permalink
Removed resume case for moving contentions. Will just restart for job…
Browse files Browse the repository at this point in the history
…s resumed in this state.
  • Loading branch information
dfitchett committed Jan 5, 2024
1 parent 7a2e7cf commit fc65ba8
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 28 deletions.
5 changes: 1 addition & 4 deletions domain-ee/ee-ep-merge-app/src/python_src/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,7 @@ def start_job_state_machine(merge_job):


def resume_job_state_machine(in_progress_job):
if in_progress_job.state == JobState.RUNNING_MOVE_CONTENTIONS_TO_PENDING_CLAIM:
in_progress_job.error("Job abandoned: Unable to verify if the contentions were successfully moved to pending EP")
EpMergeMachine(in_progress_job, Workflow.RESUME_MOVE_CONTENTIONS).start()
elif in_progress_job.state == JobState.RUNNING_CANCEL_EP400_CLAIM:
if in_progress_job.state == JobState.RUNNING_CANCEL_EP400_CLAIM:
EpMergeMachine(in_progress_job, Workflow.RESUME_CANCEL_EP400).start()
elif in_progress_job.state == JobState.RUNNING_ADD_CLAIM_NOTE_TO_EP400:
EpMergeMachine(in_progress_job, Workflow.RESUME_ADD_NOTE).start()
Expand Down
3 changes: 1 addition & 2 deletions domain-ee/ee-ep-merge-app/src/python_src/graph_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_graph(self):
for state in self.machine.states:
node = self._state_as_node(state)
if node:
if 'Completed success' == state.name and self.machine.main_event != 'resume_processing_from_running_move_contentions_to_pending_claim':
if 'Completed success' == state.name:
graph.add_node(node)
elif 'Completed error' == state.name:
graph.add_node(node)
Expand Down Expand Up @@ -132,7 +132,6 @@ def generate_graph(main_event):
if __name__ == "__main__":
events = [
'process',
'resume_processing_from_running_move_contentions_to_pending_claim',
'resume_processing_from_running_cancel_ep400_claim',
'resume_processing_from_running_add_note_to_ep400_claim',
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ class EpMergeMachine(StateMachine):
| running_add_claim_note_to_ep400.to(completed_error, cond="has_error")
)
resume_restart = process
resume_processing_from_running_move_contentions_to_pending_claim = (
pending.to(completed_error)
)
resume_processing_from_running_cancel_ep400_claim = (
pending.to(running_get_pending_claim)
| running_get_pending_claim.to(running_cancel_ep400_claim, unless="has_error")
Expand Down

This file was deleted.

0 comments on commit fc65ba8

Please sign in to comment.