JWood48
12/03/2022, 12:34 PMcheck_repos_test:
while true:
https_exec := catch --trace:
// Open network
network_interface := net.open
client := http.Client.tls network_interface
--root_certificates=CERTIFICATES
// Set headers for auth
headers/http.Headers := http.Headers
headers.set "PRIVATE-TOKEN" GL_TOKEN
// Make get request
response := client.get "gitlab.com" GL_PATH --headers=headers
// Check response
if response.status_code != 200:
print "FAILED_WITH $response.status_code"
else:
result := json.decode_stream response.body
print "RESULT: $response.status_code :: $result[0]["status"]"
if result[0]["status"] == "success":
print "BUILD_STATUS: SUCCESS"
else:
print "BUILD_STATUS: $result[0]["status"]"
// close network interface
network_interface.close
if https_exec:
print "ERROR: $https_exec"
sleep --ms=CALL_SERVER_TIMEOUT
JWood48
12/03/2022, 12:53 PMJWood48
12/03/2022, 12:59 PMJWood48
12/03/2022, 1:00 PMerikcorry
12/05/2022, 10:55 AMerikcorry
12/05/2022, 10:59 AMclient.close
and I think you can move the net.open
outside the loop and reuse it with no close.erikcorry
12/05/2022, 11:58 AMerikcorry
12/05/2022, 11:58 AMerikcorry
12/05/2022, 11:59 AMresponse.body.read
that should trigger the auto-close.erikcorry
12/05/2022, 11:59 AMerikcorry
12/05/2022, 12:43 PMJWood48
12/06/2022, 3:14 PMJWood48
12/06/2022, 3:30 PMJWood48
12/06/2022, 3:30 PMerikcorry
12/08/2022, 2:43 PMerikcorry
12/08/2022, 2:46 PMjag pkg uninstall http
jag pkg install --local --name=http ../../path/to/repo
erikcorry
12/08/2022, 2:47 PMerikcorry
12/08/2022, 2:48 PMkasperl
12/15/2022, 2:29 PMJWood48
12/22/2022, 9:32 AMkasperl
12/22/2022, 9:33 AM