Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Add switch_host submodule#3

Open
betaredex wants to merge 1 commit into
CCI-MOC:masterfrom
betaredex:master
Open

Add switch_host submodule#3
betaredex wants to merge 1 commit into
CCI-MOC:masterfrom
betaredex:master

Conversation

@betaredex

Copy link
Copy Markdown

No description provided.

@larsks

larsks commented Apr 7, 2020

Copy link
Copy Markdown
Member

Elliot,

Can you update your commit message to provide a brief description of what the commit is before? This guide from the Erlang folks is a good summary of how to structure a useful commit message.

"A List Apart" has a slightly longer article that says pretty much the same thing.

@betaredex

Copy link
Copy Markdown
Author

My bad, I figured since I had discussed this with Gagan I wouldn't need to explain as much.
I wrote a script to automatically switch to a backup server if the main server goes down, and Gagan wanted to include it in the main website repo, so I added it as a submodule.

@gagansk gagansk self-requested a review April 13, 2020 23:30
@gagansk

gagansk commented Apr 14, 2020

Copy link
Copy Markdown

@betaredex Instead of copying config.py_SAMPLE to config.py, I think it can be imported directly in switch_host.py as "import config.py_SAMPLE as cfg".

Also, we will have to follow the naming convention and rename config.py_SAMPLE as switch_config.py. And then we need to add the line *config.py to the .gitignore file to avoid uploading it accidentally.

@larsks I know you don't want to be involved in the website development :) But can you please give your opinion on this?

@larsks

larsks commented Apr 14, 2020

Copy link
Copy Markdown
Member

@betaredex Instead of copying config.py_SAMPLE to config.py, I think it can be imported directly in switch_host.py as "import config.py_SAMPLE as cfg".

@gagansk ,

(a) I don't understand the context for your comment, because the files you are discussing are not part of this pull request, and

(b) That's not valid syntax (you import modules, not files, so if you had a file named config_SAMPLE.py you could import config_SAMPLE, but you can't import config.py_SAMPLE unless you have a directory named config containing the files __init__.py and py_SAMPLE.py).

(c) Without seeing the code involved I'm just making stuff up, but it sounds like a bad idea to try importing something with "sample" or "example' in the name (because it's not really a sample, then, it's actual configuration that you're using).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants