File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
opengrok-tools/src/main/python/opengrok_tools Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -153,8 +153,6 @@ def main():
153
153
"opengrok-sync.lock" ))
154
154
try :
155
155
with lock .acquire (timeout = 0 ):
156
- pool = Pool (processes = int (args .workers ))
157
-
158
156
if args .projects :
159
157
dirs_to_process = args .projects
160
158
logger .debug ("Processing directories: {}" .
@@ -186,10 +184,12 @@ def main():
186
184
cmds_base .append (cmd_base )
187
185
188
186
# Map the commands into pool of workers so they can be processed.
187
+ pool = Pool (processes = int (args .workers ))
189
188
try :
190
189
cmds_base_results = pool .map (worker , cmds_base , 1 )
191
190
except KeyboardInterrupt :
192
- # XXX lock.release() or return 1 ?
191
+ pool .close ()
192
+ pool .terminate ()
193
193
sys .exit (1 )
194
194
else :
195
195
for cmds_base in cmds_base_results :
You can’t perform that action at this time.
0 commit comments