Skip to content

Finalized port closing and error warning.#391

Merged
Alek99 merged 13 commits intomainfrom
alek/port
Jan 30, 2023
Merged

Finalized port closing and error warning.#391
Alek99 merged 13 commits intomainfrom
alek/port

Conversation

@Alek99
Copy link
Member

@Alek99 Alek99 commented Jan 30, 2023

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

New Feature Submission:

  • Does your submission pass the tests?
  • Have you linted your code locally prior to submission?

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

After these steps, you're ready to open a pull request.

a. Give a descriptive title to your PR.

b. Describe your changes.

c. Put `closes #XXXX` in your comment to auto-close the issue that your PR fixes (if such).

@Alek99 Alek99 closed this Jan 30, 2023
@Alek99 Alek99 reopened this Jan 30, 2023
Copy link
Contributor

@picklelo picklelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, just some comments to clean up the code

frontend_action = Prompt.ask("Kill it?", choices=["y", "n"])
if frontend_action == "y":
kill_process_on_port(port)
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need this else

Copy link
Contributor

@picklelo picklelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet

Args:
port: The port.
"""
if get_process_on_port(port) is not None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: we can store this in a variable so we don't call the function twice

@Alek99 Alek99 merged commit 450576b into main Jan 30, 2023
@picklelo picklelo linked an issue Jan 30, 2023 that may be closed by this pull request
@Alek99 Alek99 deleted the alek/port branch February 1, 2023 06:27
ACucos1 pushed a commit to ACucos1/rd-pynecone that referenced this pull request Feb 28, 2023
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.

Subprocesses aren't always killed on pc command exit

2 participants