updated actor to following naming conventions
This commit is contained in:
40
README.md
40
README.md
@@ -38,4 +38,42 @@ let handle = spawn_osis_actor(
|
||||
- **Actor ID**: `"osis"` (constant)
|
||||
- **Actor Type**: `"OSIS"`
|
||||
- **Processing Model**: Sequential, blocking
|
||||
- **Script Engine**: Rhai with OSIS-specific DSL extensions
|
||||
- **Script Engine**: Rhai with OSIS-specific DSL extensions
|
||||
## Canonical Redis queues and verification
|
||||
|
||||
The project uses canonical dispatch queues per script type. For OSIS, the work queue is:
|
||||
- hero:q:work:type:osis
|
||||
|
||||
Consumer behavior:
|
||||
- The in-repo actor derives ScriptType=OSIS from its actor_id containing "osis" and BLPOPs hero:q:work:type:osis.
|
||||
- This repo’s OSIS actor has been updated so its actor_id is "osis", ensuring it consumes the canonical queue.
|
||||
|
||||
Quick verification (redis-cli):
|
||||
- List work queues:
|
||||
- KEYS hero:q:work:type:*
|
||||
- Check OSIS queue length:
|
||||
- LLEN hero:q:work:type:osis
|
||||
- Inspect a specific job (replace {job_id} with the printed id):
|
||||
- HGET hero:job:{job_id} status
|
||||
- HGET hero:job:{job_id} output
|
||||
|
||||
Run options:
|
||||
- Option A: Run the example which spawns the OSIS actor and dispatches jobs to the canonical queue.
|
||||
1) Start Redis (if not already): redis-server
|
||||
2) In this repo:
|
||||
- cargo run --example actor
|
||||
3) Observe the console: job IDs will be printed as they are created and dispatched.
|
||||
4) In a separate terminal, verify with redis-cli:
|
||||
- LLEN hero:q:work:type:osis (will briefly increment, then return to 0 as the actor consumes)
|
||||
- HGET hero:job:{job_id} status (should transition to started then finished)
|
||||
- HGET hero:job:{job_id} output (should contain the script result)
|
||||
|
||||
- Option B: Run the standalone actor binary and dispatch from another process that pushes to the canonical type queue.
|
||||
1) Start the actor:
|
||||
- cargo run --bin actor_osis
|
||||
2) From any producer, LPUSH hero:q:work:type:osis {job_id} after persisting the job hash hero:job:{job_id}.
|
||||
3) Use the same redis-cli checks above to confirm consumption and completion.
|
||||
|
||||
Notes:
|
||||
- Hash-only result model is the default. The job result is written to hero:job:{job_id}.output and status=finished.
|
||||
- Reply queues (hero:q:reply:{job_id}) are optional and not required for OSIS to function.
|
Reference in New Issue
Block a user