Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thewatts/c932f1b2912208af4559d404fcbdd2bb to your computer and use it in GitHub Desktop.
Save thewatts/c932f1b2912208af4559d404fcbdd2bb to your computer and use it in GitHub Desktop.
Elemental ping
## ADDED.
require 'net/http'
## What they gave me.
# Get the job-related command line arguments. FOR DEMO
params = Hash.new
if ARGV[0].is_int?
jobId = ARGV.shift
input = ARGV.shift
mode = ARGV.shift
numOutputs = ARGV.shift
# Setup the params hash. FOR DEMO.
params = {
"job_type" => "Job", # default to Job, since Live has used JSON for a while, so "fallback" is more likely to be Server
"script_type" => "#{mode}",
"id" => jobId,
"output_groups" => [],
"inputs" => [{'uri' => "#{input}", 'type' => "FileInput"}]
}​
#### WHAT I THINK I NEED:
thefilename = ARGV.shift
http = Net::HTTP.new('https://recording.music.unt.edu/elementalupdate.php?filename='.thefilename)
response = http.request_get('/')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment