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

Function merge_task

shared/utils/task/task_complete.py:189–214  ·  view source on GitHub ↗

Merge completed task work back in to original directory

(session,
               job,
               task)

Source from the content-addressed store, hash-verified

187
188
189def merge_task(session,
190 job,
191 task):
192 """
193
194 Merge completed task work back in to original directory
195
196 """
197 # Merge back to PROJECT directory
198
199 directory_id = job.completion_directory_id
200 if directory_id is None:
201 directory_id = job.project.directory_default_id
202
203 file_id = task.file_original_id
204
205 link = WorkingDirFileLink.file_link(session = session,
206 working_dir_id = directory_id,
207 file_id = file_id)
208 session.add(link)
209
210 # TODO consider how this effects committed
211 # Is it safe to just "update" it this way?
212 # SHould this be a built in method of WorkingDirFileLink
213
214 link.file_id = task.file_id
215
216
217def task_complete_transaction_normal(session,

Callers 1

task_completeFunction · 0.85

Calls 2

file_linkMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected