Compare commits
6 commits
b1632714f8
...
5f26ac7629
Author | SHA1 | Date | |
---|---|---|---|
5f26ac7629 | |||
5f84042050 | |||
824abbe176 | |||
a815bd6763 | |||
a6ee0440d0 | |||
3065501f97 |
3 changed files with 15 additions and 5 deletions
|
@ -25,6 +25,8 @@ hass {{ ttl }} IN A {{ link }}
|
||||||
k8s {{ ttl }} IN A {{ link }}
|
k8s {{ ttl }} IN A {{ link }}
|
||||||
git {{ ttl }} IN A {{ link }}
|
git {{ ttl }} IN A {{ link }}
|
||||||
sso {{ ttl }} IN A {{ link }}
|
sso {{ ttl }} IN A {{ link }}
|
||||||
|
jelly {{ ttl }} IN A {{ link }}
|
||||||
|
podfetch {{ ttl }} IN A {{ link }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
# Secrets service
|
# Secrets service
|
||||||
|
|
|
@ -12,4 +12,5 @@ cp Dockerfile "$tmpdir/"
|
||||||
cp -r "$zapp" "$tmpdir/"
|
cp -r "$zapp" "$tmpdir/"
|
||||||
|
|
||||||
cd "${tmpdir}"
|
cd "${tmpdir}"
|
||||||
docker build "$@" -f Dockerfile .
|
docker build "$@" -f Dockerfile -t registry.tirefireind.us/arrdem/tentacles:latest .
|
||||||
|
docker push registry.tirefireind.us/arrdem/tentacles:latest
|
||||||
|
|
|
@ -84,11 +84,16 @@ def poll_printers(app: App, db: Db) -> None:
|
||||||
"/api/plugin/bedready",
|
"/api/plugin/bedready",
|
||||||
json={
|
json={
|
||||||
"command": "check_bed",
|
"command": "check_bed",
|
||||||
"similarity": 0.94,
|
|
||||||
"reference": snapshots[0],
|
"reference": snapshots[0],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
return status.get("bed_clear", True)
|
|
||||||
|
if "error" in status:
|
||||||
|
log.error(f"Printer {printer.id} failed to report bed readiness with {status!r}")
|
||||||
|
return False
|
||||||
|
|
||||||
|
similarity = status.get("similarity", 0.0) ** 3 # Cube it
|
||||||
|
return similarity > 0.9
|
||||||
|
|
||||||
printer_job = {}
|
printer_job = {}
|
||||||
try:
|
try:
|
||||||
|
@ -157,7 +162,8 @@ def assign_jobs(app: App, db: Db) -> None:
|
||||||
if job.printer_id:
|
if job.printer_id:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
for printer in db.list_idle_printers():
|
idle = list(db.list_idle_printers())
|
||||||
|
for printer in idle:
|
||||||
if (
|
if (
|
||||||
job.analysis_id is not None
|
job.analysis_id is not None
|
||||||
and printer.limit_x >= job.max_x
|
and printer.limit_x >= job.max_x
|
||||||
|
@ -172,7 +178,8 @@ def assign_jobs(app: App, db: Db) -> None:
|
||||||
log.info(f"Mapped job {job.id} to printer {printer.id}")
|
log.info(f"Mapped job {job.id} to printer {printer.id}")
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
log.info(f"Could not map job {job!r}")
|
if idle:
|
||||||
|
log.info(f"Could not map job {job!r}")
|
||||||
|
|
||||||
|
|
||||||
def push_jobs(app: App, db: Db) -> None:
|
def push_jobs(app: App, db: Db) -> None:
|
||||||
|
|
Loading…
Reference in a new issue