Comments (4)
Thanks for the heads up! I'll work on adding a param to set a limit to the max number of connections allowed with a sane default.
I'll also try to add some error checking so a retry attempt is made with a warning to the user.
from git2jss.
So I was able to reproduce the issue on the master branch by creating a bunch of dummy scripts.
for i in {1..200}; do echo "exit 0" >> scripts/${i}.sh; done
Traceback (most recent call last):
File "./sync.py", line 103, in upload_script
auth=auth) as resp:
File "/Users/ajf023/.pyenv/versions/3.6.3/lib/python3.6/site-packages/aiohttp/client.py", line 690, in __aenter__
self._resp = yield from self._coro
File "/Users/ajf023/.pyenv/versions/3.6.3/lib/python3.6/site-packages/aiohttp/client.py", line 267, in _request
conn = yield from self._connector.connect(req)
File "/Users/ajf023/.pyenv/versions/3.6.3/lib/python3.6/site-packages/aiohttp/connector.py", line 389, in connect
yield from fut
concurrent.futures._base.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./sync.py", line 159, in <module>
loop.run_until_complete(main(args))
File "uvloop/loop.pyx", line 1364, in uvloop.loop.Loop.run_until_complete
File "./sync.py", line 144, in main
await upload_scripts(session, args.url, args.username, args.password)
File "./sync.py", line 91, in upload_scripts
responses = await asyncio.gather(*tasks)
File "./sync.py", line 111, in upload_script
resp = await session.post(post_url, auth=auth, data=ET.tostring(template), headers=headers)
File "/Users/ajf023/.pyenv/versions/3.6.3/lib/python3.6/site-packages/async_timeout/__init__.py", line 35, in __exit__
self._do_exit(exc_type)
File "/Users/ajf023/.pyenv/versions/3.6.3/lib/python3.6/site-packages/async_timeout/__init__.py", line 80, in _do_exit
raise asyncio.TimeoutError
concurrent.futures._base.TimeoutError
Can you test the branch I created for issue#5 and let me know the results, I was able to successfully upload the scripts from this branch by creating a semaphore to make sure not too many connections were opened at once.
from git2jss.
From my first test there were no errors posting to a JSS on V10. :D
from git2jss.
Running in production seeing no errors with a limit :) 👍
from git2jss.
Related Issues (15)
- Not Fully Asynchronous When Syncing Scripts
- publish on pypi HOT 1
- sync not uploading EAs/Scripts if jamf has none
- store command line args in keychain HOT 4
- ElementTree errors on parsing "&" HOT 6
- sync.py do_not_verify_ssl HOT 7
- No interpreter directive found for (zsh) HOT 2
- Not supplying --password produces error HOT 5
- Add support for Configuration Profiles HOT 3
- DeprecationWarning: with timeout() is deprecated, use async with timeout() instead HOT 8
- Jamf API changes HOT 4
- using export_path with download.py caused errors in sync.py with sync_path HOT 1
- refactor directory structure HOT 1
- Add Flag for Disabling Validation of cert
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from git2jss.