OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

jobs.enqueue

Enqueue a background job for async processing.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.jobs
  • Tags: jobs, enqueue
  • File: packages/libs/jobs/src/contracts/index.ts
  • field.key.label
    jobs.enqueue
    field.version.label
    1.0.0
    field.type.label
    operation (command)
    field.title.label
    jobs.enqueue
    field.description.label

    Enqueue a background job for async processing.

  • Type: operation (command)
  • Version: 1.0.0
  • Stability: stable
  • Owners: platform.jobs
  • Tags: jobs, enqueue
  • File: packages/libs/jobs/src/contracts/index.ts
  • field.tags.label
    jobs,enqueue
    field.owners.label
    platform.jobs
    field.stability.label
    stable

    Enqueue a background job for async processing.

    Goal

    Allow services to offload work to background processing.

    Context

    Called by any service that needs async processing.

    Emitted Events

    `job.enqueued` (v1.0.0)

    Source Definition

    import { defineCommand, defineQuery } from '@lssm-tech/lib.contracts-spec';
    import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
    
    export const EnqueueJobContract = defineCommand({
    	meta: {
    		key: 'jobs.enqueue',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['platform.jobs'],
    		tags: ['jobs', 'enqueue'],
    		description: 'Enqueue a background job for async processing.',
    		goal: 'Allow services to offload work to background processing.',
    		context: 'Called by any service that needs async processing.',
    	},
    	io: {
    		input: EnqueueJobInput,
    		output: JobModel,
    	},
    	policy: {
    		auth: 'user',
    	},
    	sideEffects: {
    		emits: [
    			{
    				key: 'job.enqueued',
    				version: '1.0.0',
    				when: 'Job is enqueued',
    				payload: JobEnqueuedPayload,
    			},
    		],
    	},
    });