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.
| Kind | What it is | From |
|---|---|---|
part-source | The part: .ofb, .of1, .stp or .step | you, or the editor |
asm-json | An assembly with references | you, or the editor |
assembly-source | A self-contained assembly as one .ofb | you |
part-scg, assembly-scg | Geometry for viewing and for assemblies | a job |
part-meta, asm-meta | Measures: volume, size, centre of gravity, expressions; for assemblies the instance tree and quantities | a job |
thumbnail | A 512 × 512 picture | a job |
assembly-ofb, assembly-stp | The assembly as one file, on request | a job |
code-snapshot, code-manifest | A generator's code and its parameters | a 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.