BlockModel#

class lsst.ts.scriptqueue.BlockModel#

Bases: object

Manages block information.

Blocks are a collection of scripts that must be executed together by the ScriptQueue. They must be executed in the order in which they are added to the queue and cannot have interleaving scripts between them. If one script of the block fails the entire block must fail.

Methods Summary

add_block(block_info)

Add block info to the list of blocks.

get_current_block(block_id)

Return the BlockInfo for the current block.

remove_done_blocks()

Remove blocks that have already finished.

Methods Documentation

add_block(block_info)#

Add block info to the list of blocks.

When a new block is added it will become the “current” block of its type. If another block of the same type is currently incomplete, it is going to be moved down the list.

Parameters:

block_info (BlockInfo) – Information about a block.

Return type:

None

get_current_block(block_id)#

Return the BlockInfo for the current block.

Parameters:

block_id (str) – Id of the block, e.g. BLOCK-000.

Returns:

block_info – Info about the current block.

Return type:

BlockInfo

remove_done_blocks()#

Remove blocks that have already finished.

Return type:

None