Skip to content

New management command reset_sync for killed sync issues #7

@bjester

Description

@bjester

Overview

Sometimes, if something abnormal occurs, like the Kolibri job that is running the sync finalization in background gets killed abruptly, we need to reset some values on the sync and transfer sessions in order to use kolibri's resumesync command. I'd like a management command which resets the state (stage and status, along with sync-extras metadata) so that can resume at the stage it was interrupted.

Description and outcomes

A new management command reset_sync should exist which should:

  • Accept a script argument --sync-session-id
  • Check SyncSession.process_id to ensure that process isn't still running
  • Accept a script argument --force which bypasses the process_id check
  • Update the in-progress TransferSession fields transfer_stage and transfer_stage_status to the previous stage and COMPLETED respectively
  • Update the extra_fields on SyncSession to remove the <transfer_session_id>_<transfer_stage>_job_id key for the stage the TransferSession was interrupted

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions