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

creating a timeout ( issue #44) #47

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

anshkarwasra
Copy link

@anshkarwasra anshkarwasra commented Dec 16, 2024

Related Issue

**Closes #44 **
Type of Change

  • New Feature
  • Bug Fix
  • Code Refactor
  • Documentation Update

Description of Change
updating main.py with asyncio and sys module helping in tackling issue #44 adds an timeout of 10s whenever user is idle for more then 10s application terminates automatically

Implementation Details
instead of taking input from user normally, called input function separately in an async thread and used wait_for function to await for that thread . then to keep track if user is idle or not , i raised an timeout exception when ever it took more then 10s to execute the input thread and terminated the application

@fillingtothemomo
Copy link
Collaborator

fillingtothemomo commented Dec 16, 2024

@anshkarwasra Please follow pull request format on mergefest-hacker contributions.md file. Also please create a new branch for your change as per contribution guidelines

@fillingtothemomo fillingtothemomo marked this pull request as draft December 16, 2024 13:00
@anshkarwasra
Copy link
Author

okay

@IronJam11
Copy link
Collaborator

There are a few issues that I think you need to address:

  • The program is not shutting down entirely on timeout, it gets shut down on CTRL+C only making it inconvenient for an user
  • There are unnecessary files like google.pass and google

@anshkarwasra
Copy link
Author

There are a few issues that I think you need to address:

* The program is not shutting down entirely on timeout, it gets shut down on CTRL+C only making it inconvenient for an user

* There are unnecessary files like google.pass and google

i will remove those clutter files but program is terminating as expected (yeah that empty input prompt still exist dk why)

@fillingtothemomo
Copy link
Collaborator

There are a few issues that I think you need to address:

* The program is not shutting down entirely on timeout, it gets shut down on CTRL+C only making it inconvenient for an user

* There are unnecessary files like google.pass and google

i will remove those clutter files but program is terminating as expected (yeah that empty input prompt still exist dk why)

The empty input prompt should not be displayed , please work on that. Also consider squashing your commits into 1 commit as this is an easy issue and it is a good practice to squash multiple commits into one when dealing with good first issues.

@anshkarwasra
Copy link
Author

anshkarwasra commented Dec 17, 2024

There are a few issues that I think you need to address:

* The program is not shutting down entirely on timeout, it gets shut down on CTRL+C only making it inconvenient for an user
  • There are unnecessary files like google.pass and google

i will remove those clutter files but program is terminating as expected (yeah that empty input prompt still exist dk why)

The empty input prompt should not be displayed , please work on that. Also consider squashing your commits into 1 commit as this is an easy issue and it is a good practice to squash multiple commits into one when dealing with good first issues.

now its terminating without the empty input prompt


new

@anshkarwasra anshkarwasra marked this pull request as ready for review December 17, 2024 10:07
@IronJam11
Copy link
Collaborator

kindly pull the updated codebase first and then register your changes to avoid conflicts

@anshkarwasra
Copy link
Author

i tried pulling from updated branch but its not resolving the conflict :(

@fillingtothemomo
Copy link
Collaborator

@anshkarwasra there are a lot of unneccesary line spaces in the new code , as well as modification of older code that is not required please fix that and resolve merge conflicts

@fillingtothemomo fillingtothemomo marked this pull request as draft January 3, 2025 18:19
@IronJam11
Copy link
Collaborator

the keyboard interrupt error is still coming i think, can you crosscheck that, attach a video if need be :)

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.

Add a timeout for idle sessions
3 participants