Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: crashes on ctrl + c #973

Merged
merged 2 commits into from
Oct 3, 2024
Merged

fix: crashes on ctrl + c #973

merged 2 commits into from
Oct 3, 2024

Conversation

sansyrox
Copy link
Member

@sansyrox sansyrox commented Sep 28, 2024

Description

This PR fixes Ctrl + C causing crashes on mac.

Summary

This PR fixes Ctrl + C causing crashes on mac.

PR Checklist

Please ensure that:

  • The PR contains a descriptive title
  • The PR contains a descriptive summary of the changes
  • You build and test your changes before submitting a PR.
  • You have added relevant documentation
  • You have added relevant tests. We prefer integration tests wherever possible

Pre-Commit Instructions:

Copy link

vercel bot commented Sep 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
robyn ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 30, 2024 4:28pm

Copy link

codspeed-hq bot commented Sep 28, 2024

CodSpeed Performance Report

Merging #973 will not alter performance

Comparing fix/panic (40829b0) with main (d5394e0)

Summary

✅ 116 untouched benchmarks

@sansyrox sansyrox merged commit 3415fcd into main Oct 3, 2024
79 checks passed
@sansyrox sansyrox deleted the fix/panic branch October 3, 2024 14:43
@VishnuSanal
Copy link
Contributor

VishnuSanal commented Oct 4, 2024

@sansyrox still crashes on my machine 🤔

(.venv) Robyn $ robyn testing_application/app.py
INFO:robyn.logger:SERVER IS RUNNING IN VERBOSE/DEBUG MODE. Set --log-level to WARN to run in production mode.
INFO:robyn.logger:Added route HttpMethod.GET /
INFO:robyn.logger:Added route HttpMethod.GET /openapi.json
INFO:robyn.logger:Added route HttpMethod.GET /docs
INFO:robyn.logger:Docs hosted at http://127.0.0.1:8081/docs
INFO:robyn.logger:Robyn version: 0.61.2
INFO:robyn.logger:Starting server at http://127.0.0.1:8081
INFO:actix_server.builder:starting 1 workers
INFO:actix_server.server:Actix runtime found; starting in Actix runtime
^CINFO:actix_server.server:SIGINT received; starting forced shutdown
INFO:actix_server.worker:shutting down idle worker
INFO:actix_server.accept:accept thread stopped
Traceback (most recent call last):
  File "/home/vishnu/PycharmProjects/Robyn/.venv/bin/robyn", line 8, in <module>
    sys.exit(run())
             ^^^^^
  File "/home/vishnu/PycharmProjects/Robyn/robyn/cli.py", line 130, in run
    start_app_normally(config)
  File "/home/vishnu/PycharmProjects/Robyn/robyn/cli.py", line 99, in start_app_normally
    subprocess.run(command, start_new_session=False)
  File "/usr/lib/python3.12/subprocess.py", line 550, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 1201, in communicate
    self.wait()
  File "/usr/lib/python3.12/subprocess.py", line 1264, in wait
    return self._wait(timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 2053, in _wait
    (pid, sts) = self._try_wait(0)
                 ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 2011, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyboardInterrupt

code used

from robyn import Robyn

app = Robyn(__file__)


@app.get("/")
async def index():
    return "hello world"


app.start(port=8081)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants