CommandsFeature execution status and history

Where is the execution history of the command feature stored, and is it possible to retrieve the status of a command execution?

Ideally, I would like to follow AWS pattern for running long jobs so something like:

  • StartMyCommand starts the SS Command, returning an ExecutionId
  • DescribeMyCommand returned the status (Executing, Completed, Error …) for a given ExecutionId
  • ListMyCommand returns list of commands run with there ExecutionID and final status

They’re not persisted, they’re only maintained in rolling in-memory collections.

Are there any workarounds/suggestions?

You can access the collections from the CommandsFeature plugin, (e.g. with HostContext.GetPlugin<CommandsFeature>()) which are maintained in rolling Concurrent Queues whilst the summaries are contained within a Concurrent Dictionary:

Commands are not assigned an Id so you’re unlikely to implement what you want.

We intend on creating a backgrounds job feature to execute APIs and Commands that would be persisted which is more aligned to this feature, but we haven’t started on that yet.

We’ve just added support for Background Jobs in ServiceStack v8.4 which should do most of what you’re after.