mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-10 03:01:29 -07:00
parallelize getting mount info (#49398)
* parallelize getting mount info * fixed timeout and made 8 max thread count - minor cleanup - avoid empty mount entries - set timeout on get - enforce timeout per mount/thread - make note on failure per mount - make note on timeout per mount - ensure proper pool control - minor fixes - less vars, simpler code - move filter 'pre threading' - remove timeout for all mounts, now per mount - also use cpu count from multiprocessing lib - moved 'bind' options out of thread as per comments - warn on error, more info on failure to get info
This commit is contained in:
parent
960388143f
commit
42c35a2e01
2 changed files with 68 additions and 33 deletions
|
@ -84,6 +84,7 @@ class TestFactsLinuxHardwareGetMountFacts(unittest.TestCase):
|
|||
'uuid': 'N/A'}
|
||||
home_info = [x for x in mount_facts['mounts'] if x['mount'] == '/home'][0]
|
||||
|
||||
self.maxDiff = 4096
|
||||
self.assertDictEqual(home_info, home_expected)
|
||||
|
||||
@patch('ansible.module_utils.facts.hardware.linux.get_file_content', return_value=MTAB)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue