mirror of
https://github.com/joshuaboniface/rffmpeg.git
synced 2026-07-18 00:45:53 +00:00
Clean up variable names
This commit is contained in:
parent
0d726b9ce8
commit
b20595638a
1 changed files with 8 additions and 8 deletions
16
rffmpeg
16
rffmpeg
|
|
@ -175,7 +175,7 @@ def cleanup(signum="", frame=""):
|
|||
)
|
||||
|
||||
|
||||
def generate_ssh_command(config, target_host):
|
||||
def generate_ssh_command(config, target_hostname):
|
||||
"""
|
||||
Generate an SSH command for use.
|
||||
"""
|
||||
|
|
@ -206,7 +206,7 @@ def generate_ssh_command(config, target_host):
|
|||
ssh_command.append(arg)
|
||||
|
||||
# Add user+host string
|
||||
ssh_command.append("{}@{}".format(config["remote_user"], target_host))
|
||||
ssh_command.append("{}@{}".format(config["remote_user"], target_hostname))
|
||||
|
||||
return ssh_command
|
||||
|
||||
|
|
@ -329,7 +329,7 @@ def get_target_host(config):
|
|||
log.debug("Selecting host as current lowest proc count (raw count: {}, weighted count: {})".format(raw_proc_count, weighted_proc_count))
|
||||
|
||||
log.debug("Found optimal host {} ID {} '{}'".format(target_server_name, target_hid, target_hostname))
|
||||
return target_server_name, target_hid, target_hostname
|
||||
return target_hid, target_server_name, target_hostname
|
||||
|
||||
|
||||
def run_local_ffmpeg(config, ffmpeg_args):
|
||||
|
|
@ -376,11 +376,11 @@ def run_local_ffmpeg(config, ffmpeg_args):
|
|||
return run_command(rffmpeg_ffmpeg_command, stdin, stdout, stderr)
|
||||
|
||||
|
||||
def run_remote_ffmpeg(config, target_hid, target_host, target_server_name, ffmpeg_args):
|
||||
def run_remote_ffmpeg(config, target_hid, target_hostname, target_server_name, ffmpeg_args):
|
||||
"""
|
||||
Run ffmpeg against the remote target_host.
|
||||
Run ffmpeg against the remote target_hostname.
|
||||
"""
|
||||
rffmpeg_ssh_command = generate_ssh_command(config, target_host)
|
||||
rffmpeg_ssh_command = generate_ssh_command(config, target_hostname)
|
||||
rffmpeg_ffmpeg_command = list()
|
||||
|
||||
# Add any pre commands
|
||||
|
|
@ -413,7 +413,7 @@ def run_remote_ffmpeg(config, target_hid, target_host, target_server_name, ffmpe
|
|||
else:
|
||||
rffmpeg_ffmpeg_command.append("{}".format(arg))
|
||||
|
||||
log.info("Running command on {} host '{}'".format(target_server_name, target_host))
|
||||
log.info("Running command on host {} '{}'".format(target_server_name, target_hostname))
|
||||
log.debug(
|
||||
"Remote command: {}".format(
|
||||
" ".join(rffmpeg_ssh_command + rffmpeg_ffmpeg_command)
|
||||
|
|
@ -463,7 +463,7 @@ def run_ffmpeg(config, ffmpeg_args):
|
|||
|
||||
log.info("Starting rffmpeg as {} with args: {}".format(cmd_name, " ".join(ffmpeg_args)))
|
||||
|
||||
target_hid, target_hostname, target_server_name = get_target_host(config)
|
||||
target_hid, target_server_name, target_hostname = get_target_host(config)
|
||||
|
||||
if not target_hostname or target_hostname == "localhost":
|
||||
ret = run_local_ffmpeg(config, ffmpeg_args)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue