/
opt
/
imunify360
/
venv
/
versions
/
imunify-core-8.14.0-1
/
defence360agent
/
utils
/
/opt/imunify360/venv/versions/imunify-core-8.14.0-1/defence360agent/utils
mkdir
upload
Name
Size
Mode
Actions
__pycache__/
-
0755
rm
antivirus_mode.py
497
0644
edit
dl
rm
async_utils.py
718
0644
edit
dl
rm
benchmark.py
538
0644
edit
dl
rm
buffer.py
1945
0644
edit
dl
rm
check_db.py
7988
0644
edit
dl
rm
check_lock.py
856
0644
edit
dl
rm
cli.py
9273
0644
edit
dl
rm
common.py
14757
0644
edit
dl
rm
completions.py
9988
0644
edit
dl
rm
config.py
1695
0644
edit
dl
rm
cronjob.py
902
0644
edit
dl
rm
doctor.py
5503
0644
edit
dl
rm
fd_ops.py
7573
0644
edit
dl
rm
hyperscan.py
149
0644
edit
dl
rm
importer.py
2722
0644
edit
dl
rm
ipecho.py
3247
0644
edit
dl
rm
json.py
953
0644
edit
dl
rm
kwconfig.py
1756
0644
edit
dl
rm
net.py
595
0644
edit
dl
rm
net_transport.py
16289
0644
edit
dl
rm
parsers.py
11879
0644
edit
dl
rm
resource_limits.py
5158
0644
edit
dl
rm
safe_fileops.py
13672
0644
edit
dl
rm
safe_sequence.py
363
0644
edit
dl
rm
serialization.py
2410
0644
edit
dl
rm
sshutil.py
15174
0644
edit
dl
rm
subprocess.py
1570
0644
edit
dl
rm
support.py
5329
0644
edit
dl
rm
tenant_path.py
4456
0644
edit
dl
rm
threads.py
1005
0644
edit
dl
rm
validate.py
4375
0644
edit
dl
rm
whmcs.py
7784
0644
edit
dl
rm
wordpress_mu_plugin.py
1440
0644
edit
dl
rm
zipsafe.py
720
0644
edit
dl
rm
_shutil.py
4019
0644
edit
dl
rm
__init__.py
69706
0644
edit
dl
rm
Edit:
/opt/imunify360/venv/versions/imunify-core-8.14.0-1/defence360agent/utils/async_utils.py
(718B)
from typing import List, Union, Tuple import asyncio class AsyncIterate: # not AsyncIterable because python use this name already def __init__(self, data: Union[List, Tuple]): self.queue = iter(data) def __aiter__(self): return self async def __anext__(self): data = await self.fetch_data() if data is not None: return data else: raise StopAsyncIteration async def fetch_data(self): try: item = next(self.queue) except StopIteration: item = None return item async def gather(*tasks: List) -> AsyncIterate: results = await asyncio.gather(*tasks) return AsyncIterate(results)
Save
cmd:
run