mirror of
https://github.com/YunoHost/yunorunner.git
synced 2024-09-03 20:05:52 +02:00
[mod] simplify add job command
This commit is contained in:
parent
c758f62554
commit
6c65fff4e5
2 changed files with 3 additions and 7 deletions
6
ciclic
6
ciclic
|
@ -52,7 +52,7 @@ def request_api(path, domain, verb, data={}, check_return_code=True):
|
|||
return response
|
||||
|
||||
|
||||
def add(name, url_or_path, test_type="stable", yunohost_version="unstable", debian_version="stretch", revision="master", domain=DOMAIN):
|
||||
def add(name, url_or_path, domain=DOMAIN):
|
||||
request_api(
|
||||
path="job",
|
||||
verb="post",
|
||||
|
@ -60,10 +60,6 @@ def add(name, url_or_path, test_type="stable", yunohost_version="unstable", debi
|
|||
data={
|
||||
"name": name,
|
||||
"url_or_path": url_or_path,
|
||||
"yunohost_version": yunohost_version,
|
||||
"test_type": test_type,
|
||||
"debian_version": debian_version,
|
||||
"revision": revision,
|
||||
},
|
||||
)
|
||||
|
||||
|
|
4
run.py
4
run.py
|
@ -385,8 +385,8 @@ async def api_new_job(request):
|
|||
job = Job.create(
|
||||
name=request.json["name"],
|
||||
url_or_path=request.json["url_or_path"],
|
||||
type=request.json.get("test_type", "stable"),
|
||||
debian_version=request.json.get("debian_version", "stretch"),
|
||||
type="stable",
|
||||
debian_version="stretch",
|
||||
)
|
||||
|
||||
api_logger.info(f"Request to add new job '{job.name}' [{job.id}]")
|
||||
|
|
Loading…
Add table
Reference in a new issue