Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -1670,6 +1670,18 @@ ClassMethod ImportRoutines(force As %Boolean = 0, pullEventClass As %String) As
kill files

set settings = ##class(SourceControl.Git.Settings).%New()

// Create a work queue manager to use for importing items to improve performance
// Currently only used when not compiling and not using decomposed productions
#dim queue as %SYSTEM.WorkMgr = ""
if ('settings.compileOnImport && 'settings.decomposeProductions) {
set queue = ##class(%SYSTEM.WorkMgr).%New()
if (queue = "") {
set ec = $$$ADDSC(ec, %objlasterror)
quit:'ec ec
}
}

#dim internalName as %String = ""
for {
set internalName = $order(itemList(internalName))
Expand Down Expand Up @@ -1697,14 +1709,27 @@ ClassMethod ImportRoutines(force As %Boolean = 0, pullEventClass As %String) As
set files($increment(files)) = modification
} else {
// If not compiling then import now as otherwise it won't happen
set sc = ..ImportItem(internalName, force)
set sc = $$$OK
// If a work queue has been created then use it
if (queue '= "") {
set sc = queue.Queue("..ImportItem", internalName, force)
} else {
set sc = ..ImportItem(internalName, force)
}
if $$$ISERR(sc) {
set ec = $$$ADDSC(ec, sc)
}
}
}
}

// If a work queue was created then wait for all work to finish
if (queue '= "") {
set sc = queue.Sync()
if $$$ISERR(sc) {
set ec = $$$ADDSC(ec, sc)
}
}

//let's delete all items for which corresponding files had been deleted
#dim item as %String = ""
Expand Down
Loading