Compare commits
No commits in common. "5f26ac7629372ff99ac96b6be7e90e3a62a2d56b" and "b1632714f85919ff6acab2bcc5ac7c0d27de32b6" have entirely different histories.
5f26ac7629
...
b1632714f8
3 changed files with 5 additions and 15 deletions
|
@ -25,8 +25,6 @@ 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,5 +12,4 @@ cp Dockerfile "$tmpdir/"
|
||||||
cp -r "$zapp" "$tmpdir/"
|
cp -r "$zapp" "$tmpdir/"
|
||||||
|
|
||||||
cd "${tmpdir}"
|
cd "${tmpdir}"
|
||||||
docker build "$@" -f Dockerfile -t registry.tirefireind.us/arrdem/tentacles:latest .
|
docker build "$@" -f Dockerfile .
|
||||||
docker push registry.tirefireind.us/arrdem/tentacles:latest
|
|
||||||
|
|
|
@ -84,16 +84,11 @@ 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:
|
||||||
|
@ -162,8 +157,7 @@ def assign_jobs(app: App, db: Db) -> None:
|
||||||
if job.printer_id:
|
if job.printer_id:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
idle = list(db.list_idle_printers())
|
for printer in 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
|
||||||
|
@ -178,8 +172,7 @@ 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:
|
||||||
if idle:
|
log.info(f"Could not map job {job!r}")
|
||||||
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