feat(catalogue): refresh is a button, not a schedule
The daily job is gone. A refresh only matters at one moment — you are picking a provider and want to know its models are current — and at that moment a button answers the question, where a nightly pass can only have already answered it, invisibly, or not. It also bought a standing obligation: something hitting a vendor from every install forever whether anyone opens Atelier or not. So the add dialog is now the curated file made visible. Provider comes from the catalogue, models come from that provider's entry in it, and two buttons re-read it from the vendor: one for the provider in front of you, one for all of them. `POST /providers/catalogue/refresh?provider=` is the only trigger there is. The dialog also says how old the answer is — "as shipped" until a refresh has ever run, which is worth showing, because it means the models listed are exactly what the plugin was released with. A provider with no refresher answers 400 rather than a silent success: from a button, "nothing happened" and "nothing could happen" look identical.
This commit is contained in:
@@ -4,7 +4,6 @@ import { API_URL } from '@@/officer-url.mjs';
|
||||
import { buildHonoApp } from './hono';
|
||||
import { waitForDatabase } from './db';
|
||||
import { startQueue } from './generations/queue';
|
||||
import { startCatalogueRefresh } from './catalogue/refresh';
|
||||
|
||||
// The officer-atelier sidecar. Owns the whole image-generation contract: providers, the generation
|
||||
// queue, and the `atelier` Postgres database (kept separate from officer_db — see ../PLUGIN.md).
|
||||
@@ -81,9 +80,6 @@ void (async () => {
|
||||
if (await waitForDatabase()) await startQueue();
|
||||
else console.error('[atelier:queue] not started: no database');
|
||||
|
||||
// After the database, because a refresh reads any connection's key before falling back to the
|
||||
// environment — and before it, there is nothing to read.
|
||||
await startCatalogueRefresh();
|
||||
})();
|
||||
|
||||
function shutdown(signal: string) {
|
||||
|
||||
Reference in New Issue
Block a user