MCPcopy
hub / github.com/deadc0de6/dotdrop / adapt_workers

Function adapt_workers

dotdrop/utils.py:575–582  ·  view source on GitHub ↗

adapt number of workers if safe/dry

(options, logger)

Source from the content-addressed store, hash-verified

573
574
575def adapt_workers(options, logger):
576 """adapt number of workers if safe/dry"""
577 if options.safe and options.workers > 1:
578 logger.warn('workers set to 1 when --force is not used')
579 options.workers = 1
580 if options.dry and options.workers > 1:
581 logger.warn('workers set to 1 when --dry is used')
582 options.workers = 1
583
584
585def categorize(function, iterable):

Callers 2

cmd_installFunction · 0.90
cmd_updateFunction · 0.90

Calls 1

warnMethod · 0.80

Tested by

no test coverage detected