Giter VIP home page Giter VIP logo

Comments (4)

badstreff avatar badstreff commented on September 14, 2024

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.

badstreff avatar badstreff commented on September 14, 2024

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.

rderewianko avatar rderewianko commented on September 14, 2024

From my first test there were no errors posting to a JSS on V10. :D

from git2jss.

rderewianko avatar rderewianko commented on September 14, 2024

Running in production seeing no errors with a limit :) 👍

from git2jss.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.