Cleanup: Addon, remove test files
This commit is contained in:
parent
b5053734dd
commit
ab526a30a9
@ -1,38 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import flamenco.manager
|
|
||||||
from pprint import pprint
|
|
||||||
from flamenco.manager.api import jobs_api
|
|
||||||
from flamenco.manager.model.available_job_types import AvailableJobTypes
|
|
||||||
from flamenco.manager.model.available_job_type import AvailableJobType
|
|
||||||
from flamenco.manager.model.error import Error
|
|
||||||
from flamenco.manager.model.job import Job
|
|
||||||
from flamenco.manager.model.submitted_job import SubmittedJob
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to http://localhost
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = flamenco.manager.Configuration(host="http://localhost:8080")
|
|
||||||
|
|
||||||
|
|
||||||
# Enter a context with an instance of the API client
|
|
||||||
with flamenco.manager.ApiClient(configuration) as api_client:
|
|
||||||
job_api_instance = jobs_api.JobsApi(api_client)
|
|
||||||
|
|
||||||
response: AvailableJobTypes = job_api_instance.get_job_types()
|
|
||||||
for job_type in response.job_types:
|
|
||||||
job_type: AvailableJobType
|
|
||||||
print(f"\033[38;5;214m{job_type.label}\033[0m ({job_type.name})")
|
|
||||||
for setting in job_type.settings:
|
|
||||||
print(f" - {setting.key:23} type: {setting.type!r:10}", end="")
|
|
||||||
default = getattr(setting, "default", None)
|
|
||||||
if default is not None:
|
|
||||||
print(f" default: {repr(default)}", end="")
|
|
||||||
print()
|
|
||||||
|
|
||||||
# job_id = "2f03614f-f529-445f-b8c5-272e3f437b73"
|
|
||||||
# try:
|
|
||||||
# # Fetch info about the job.
|
|
||||||
# api_response = job_api_instance.fetch_job(job_id)
|
|
||||||
# pprint(api_response)
|
|
||||||
# except flamenco.manager.ApiException as e:
|
|
||||||
# print("Exception when calling JobsApi->fetch_job: %s\n" % e)
|
|
@ -1,36 +0,0 @@
|
|||||||
#!/usr/bin/env python
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
my_dir = Path(__file__).parent
|
|
||||||
sys.path.append(str(my_dir))
|
|
||||||
|
|
||||||
|
|
||||||
import atexit
|
|
||||||
from flamenco import dependencies, job_types_propgroup as jt_propgroup
|
|
||||||
|
|
||||||
dependencies.preload_modules()
|
|
||||||
|
|
||||||
import flamenco.manager
|
|
||||||
|
|
||||||
from flamenco.manager.api import jobs_api
|
|
||||||
from flamenco.manager.model.available_job_types import AvailableJobTypes
|
|
||||||
|
|
||||||
# Defining the host is optional and defaults to http://localhost
|
|
||||||
# See configuration.py for a list of all supported configuration parameters.
|
|
||||||
configuration = flamenco.manager.Configuration(host="http://localhost:8080")
|
|
||||||
|
|
||||||
|
|
||||||
api_client = flamenco.manager.ApiClient(configuration)
|
|
||||||
atexit.register(api_client.close)
|
|
||||||
|
|
||||||
job_api_instance = jobs_api.JobsApi(api_client)
|
|
||||||
|
|
||||||
try:
|
|
||||||
response: AvailableJobTypes = job_api_instance.get_job_types()
|
|
||||||
except flamenco.manager.ApiException as ex:
|
|
||||||
raise SystemExit("Exception when calling JobsApi->fetch_job: %s" % ex)
|
|
||||||
|
|
||||||
job_type = next(jt for jt in response.job_types if jt.name == "simple-blender-render")
|
|
||||||
pg = jt_propgroup.generate(job_type)
|
|
Loading…
x
Reference in New Issue
Block a user