-
Notifications
You must be signed in to change notification settings - Fork 276
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
Added Region for lower latency #64
base: master
Are you sure you want to change the base?
Conversation
@@ -60,6 +62,7 @@ def _install_extensions(): | |||
subprocess.run(["code-server", "--install-extension", f"{ext}"]) | |||
|
|||
def _start_server(self): | |||
conf.get_default().region = self.region |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please pass region in options
here: url = ngrok.connect(addr=self.port, options={"bind_tls": True})
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried it out but it does not work by doing that. That's why I have used this method as mentioned in pyngrok docs (https://pyngrok.readthedocs.io/en/latest/#setting-the-region).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Sir, Could you please review this? I've tried the change you mention but it doesn't seem to work.
@@ -4,7 +4,7 @@ | |||
|
|||
import nest_asyncio | |||
import uvicorn | |||
from pyngrok import ngrok | |||
from pyngrok import ngrok, conf |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for 'Kaggle & Colab', So, by default US reason is fine now.
Added a region argument to ColabCode class so users can choose their closest location and have lower latency. And added description and example of that in README.
The available regions are:
us - United States (default)
eu - Europe
ap - Asia/Pacific
au - Australia
sa - South America
jp - Japan
in - India