MCPcopy Index your code
hub / github.com/diffgram/diffgram / archive_related_tasks

Function archive_related_tasks

default/methods/source_control/file/remove.py:48–62  ·  view source on GitHub ↗

Give a file, archive all the related tasks. This is used in the context of a cascade delete where the user deletes a file and wants to delete all the related tasks of that file. :param session: :param file: :return:

(session, file)

Source from the content-addressed store, hash-verified

46
47
48def archive_related_tasks(session, file):
49 """
50 Give a file, archive all the related tasks. This is used in the
51 context of a cascade delete where the user deletes a file and
52 wants to delete all the related tasks of that file.
53 :param session:
54 :param file:
55 :return:
56 """
57 tasks = session.query(Task).filter(
58 Task.file_id == file.id
59 ).update({
60 'status': 'archived'
61 })
62 return tasks
63
64
65def remove_core(session: Session, working_dir: WorkingDir, existing_file: File, cascade_archive_tasks: bool = False):

Callers 1

remove_coreFunction · 0.85

Calls 1

updateMethod · 0.45

Tested by

no test coverage detected