Skip to main content

Files and jobs

Every draft and version holds files, at most one of each kind. Sources are what the editor saves, or what someone uploads. Derived files are what ClassCAD makes of them.

KindWhat it isFrom
part-sourceThe part: .ofb, .of1, .stp or .stepyou, or the editor
asm-jsonAn assembly with referencesyou, or the editor
assembly-sourceA self-contained assembly as one .ofbyou
part-scg, assembly-scgGeometry for viewing and for assembliesa job
part-meta, asm-metaMeasures: volume, size, centre of gravity, expressions; for assemblies the instance tree and quantitiesa job
thumbnailA 512 × 512 picturea job
assembly-ofb, assembly-stpThe assembly as one file, on requesta job
code-snapshot, code-manifestA generator's code and its parametersa sync job

Jobs​

When a source changes, its derived files turn stale and a job is queued: part-derive for a part, assembly-build for an asm.json, assembly-derive for an OFB assembly. A worker claims it, loads the file in ClassCAD and stores what comes back. A file ClassCAD can't read fails the job with ClassCAD's message. A job that succeeded is what a release relies on: it proves the file opens.

Workers send heartbeats. A job whose worker goes quiet returns to the queue after 120 seconds and is tried up to three times (JOB_HEARTBEAT_TIMEOUT_S, JOB_MAX_ATTEMPTS). A failed job can be retried by hand. Errors in a generator's own code aren't retried, since they'd only fail again.

Stored once​

Files are stored by their SHA-256. The same file uploaded twice, a version, a branch or a take-over all point at the same stored file, so they cost no space.