-
Notifications
You must be signed in to change notification settings - Fork 5
Melodi Integration 0.0.1 #16
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
base: autosub_devel
Are you sure you want to change the base?
Conversation
MelodiPort = returnDict.get("PluginParameter").get(plugin_name).get("port") | ||
|
||
api_con = api_vels_ob.Configuration() | ||
api_con.host = "{}:{}/api".format(MelodiURL, MelodiPort) |
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.
Alternative would be f-string, since Python 3.6:
api_con.host = f"{MelodiURL}:{MelodiPort}/api"
@@ -773,7 +773,7 @@ def check_init_ressources(config_file): | |||
config = configparser.ConfigParser() | |||
|
|||
try: | |||
config.read_file(open(opts.configfile)) | |||
config.readfp(open(opts.configfile)) |
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.
readfp has been deprecated since Python 3.2 and was removed in Python 3.12 (October 2023). The function that shall be used is read_file
@@ -13,12 +13,12 @@ if [ $1 = "start" ] | |||
then | |||
if [ -z "$2" ] | |||
then | |||
python3 autosub.py & | |||
python3 autosub.py & |
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.
Uneeded extra whitespace
echo $! > autosub.pid | ||
echo "No config file specified, using default.cfg!" | ||
echo "Started autosub with process id $PID" | ||
else | ||
python3 autosub.py --config-file $2 & | ||
python3 autosub.py --config-file $2 & |
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.
Uneeded extra whitespace
@@ -98,7 +117,7 @@ | |||
############### | |||
json_data = { | |||
"Subject" : "Synthesis Result for Task{}".format(str(task_nr)), | |||
"Message" : server +":" + str(port) + "/"+str(user_id), | |||
"Message" : server + ":" + str(port) + "/" + str(user_id), |
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.
Could be done better with f-string
"{server}:{port}/{user_id}"
I added the Melodi API to the VELS plugin. It is still WIP, but should work.