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 }}
|
||||
git {{ ttl }} IN A {{ link }}
|
||||
sso {{ ttl }} IN A {{ link }}
|
||||
jelly {{ ttl }} IN A {{ link }}
|
||||
podfetch {{ ttl }} IN A {{ link }}
|
||||
{% endfor %}
|
||||
|
||||
# Secrets service
|
||||
|
|
|
@ -12,4 +12,5 @@ cp Dockerfile "$tmpdir/"
|
|||
cp -r "$zapp" "$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",
|
||||
json={
|
||||
"command": "check_bed",
|
||||
"similarity": 0.94,
|
||||
"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 = {}
|
||||
try:
|
||||
|
@ -157,7 +162,8 @@ def assign_jobs(app: App, db: Db) -> None:
|
|||
if job.printer_id:
|
||||
continue
|
||||
|
||||
for printer in db.list_idle_printers():
|
||||
idle = list(db.list_idle_printers())
|
||||
for printer in idle:
|
||||
if (
|
||||
job.analysis_id is not None
|
||||
and printer.limit_x >= job.max_x
|
||||
|
@ -172,6 +178,7 @@ def assign_jobs(app: App, db: Db) -> None:
|
|||
log.info(f"Mapped job {job.id} to printer {printer.id}")
|
||||
break
|
||||
else:
|
||||
if idle:
|
||||
log.info(f"Could not map job {job!r}")
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue