Skip to content

Commit

Permalink
Moved the callback definition to a point after the scritp indexes lis…
Browse files Browse the repository at this point in the history
…t definition, since the callback references that list.
  • Loading branch information
rbovill committed May 1, 2024
1 parent 28a9500 commit 463998a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/lsst/ts/IntegrationTests/base_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,6 @@ async def run(self) -> None:
# Since `async with` is used,
# you do NOT have to wait for the remote to start

# Create the callback to the ScriptQueue Script Event that
# will wait for all the scripts to complete.
self.remote.evt_script.callback = self.wait_for_done
# Convert the queue_placement parameter to the approprirate
# ScriptQueue.Location Enum object.
queue_placement = getattr(Location, self.queue_placement.upper())
Expand All @@ -209,6 +206,9 @@ async def run(self) -> None:
# Copy the script_indexes list to use in the Script Event callback.
# This maintains the integrity of the real script_indexes list.
self.temp_script_indexes = copy.deepcopy(script_indexes)
# Create the callback to the ScriptQueue Script Event that
# will wait for all the scripts to complete.
self.remote.evt_script.callback = self.wait_for_done
# Resume the ScriptQueue to begin script execution.
await self.remote.cmd_resume.set_start(timeout=10)
# Wait for the scripts to complete.
Expand Down

0 comments on commit 463998a

Please sign in to comment.