Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit 33e1f88

Browse files
committed
Committing previous work related to deploying a process that didn't make it into a prior set of commits.
1 parent 5081485 commit 33e1f88

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

unity_py/services/process_service.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import json
12
import requests
23
from typing import List
34

@@ -117,4 +118,16 @@ def get_jobs(self, process:Process):
117118
)
118119
)
119120

120-
return jobs
121+
return jobs
122+
123+
def deploy_process(self, data):
124+
125+
token = self._session.get_auth().get_token()
126+
headers = get_headers(token, {
127+
'Content-type': 'application/json'
128+
})
129+
url = self.endpoint + "processes"
130+
response = requests.post(url, headers=headers, json=json.dumps(data))
131+
response.raise_for_status()
132+
133+
return response

0 commit comments

Comments
 (0)