Tasks Component
Used to sync tasks from a source instance to a destination instance of Swimlane
sync_task
This method syncs a single task from a source Swimlane instance to a destination instance.
Using the provided task dictionary from Swimlane source instance we first get the actual task object from the source.
Next we also attempt to retrieve the task from the destination system.
If the task does not exist on the destination then we add it.
If it does exist, we check if the uid
and the version
are the same.
If they are the same we skip updating the task.
If they are different then we update the task on the destination instance.
Args: task (dict): A Swimlane task object from a source system.
Returns: dict: If we failed to add a task we return it so we can try again - only if called using the sync method.
def sync_task(self, task)
sync
This method is used to sync all tasks from a source instance to a destination instance
def sync(self)