Ticket #8971 (closed: fixed)

Opened 7 years ago

Last modified 5 years ago

Allow Python to list and cancel running algorithms

Reported by: Nick Draper Owned by: Martyn Gigg
Priority: critical Milestone: Release 3.2
Component: Python Keywords:
Cc: Blocked By:
Blocking: Tester: Russell Taylor

Description

It should be possible to list running algorithms (and access input properties).

With an algorithm handle (or alg proxy handle) it should be possible to call .cancel() to stop the algorithm.

Create an example script that shows cancellation of MonitorLiveData using a fake data generator and the following scenarios:

  1. Cancel after a period of time
  2. Cancel after a certain number of events
  3. Cancel by listing the running algorithms, selecting and cancelling (in another script).

Attachments

test_live_cancel_same_script.py (1.5 KB) - added by Martyn Gigg 7 years ago.
test_live_cancel_different_script1.py (267 bytes) - added by Martyn Gigg 7 years ago.
test_live_cancel_different_script2 .py (267 bytes) - added by Martyn Gigg 7 years ago.

Change History

comment:1 Changed 7 years ago by Nick Draper

Russell would make a good tester for this ticket

comment:2 Changed 7 years ago by Nick Draper

  • Status changed from new to assigned

Bulk move of tickets out of triage (new) to assigned at the introduction of the triage state

comment:3 Changed 7 years ago by Martyn Gigg

  • Status changed from assigned to inprogress

Export algorithm cancel & isRunning methods to Python.

Refs #8971

Changeset: ece6e7f731652538092cf080514f89bb4b9042a6

comment:4 Changed 7 years ago by Martyn Gigg

Move some AlgorithmManager tests to more relevant AlgorithmFactory

Refs #8971

Changeset: 47f39a9cff1549570a5a8917645bceb21eb1601e

comment:5 Changed 7 years ago by Martyn Gigg

Export a wrapper type for AlgorithmID

Refs #8971

Changeset: d156bdfcfdda608895c451e18325ede90318ef7b

comment:6 Changed 7 years ago by Martyn Gigg

Export more parts of AlgorithmManager to Python

Refs #8971

Changeset: ea59a55c3f82be3428246a280d85705c9b6aa803

comment:7 Changed 7 years ago by Martyn Gigg

Export more methods of AlgorithmManager.

This allows more control of algorithm cancellation from Python. Refs #8971

Changeset: 9133683c336fa73abae430eed3ff9b5c1dd6856b

comment:8 Changed 7 years ago by Martyn Gigg

Fix typo in python AlgorithmTest.

Refs #8971

Changeset: 9e152b837c607da7c04f9eb45f59a290b1d713bf

comment:9 Changed 7 years ago by Martyn Gigg

Fix AlgorithmManger python export on boost 1.43.

This version of boost can't handle exporting const pointers to Python. Refs #8971

Changeset: d2e6fc03ef9d0d46568b7e3695dd49dc39c7fa24

comment:10 Changed 7 years ago by Martyn Gigg

Fix typo in AlgorithmTest.py

Refs #8971

Changeset: 01c6939574c5bceabb5df6be65e2d46902fc8741

Changed 7 years ago by Martyn Gigg

Changed 7 years ago by Martyn Gigg

Changed 7 years ago by Martyn Gigg

comment:11 Changed 7 years ago by Martyn Gigg

  • Status changed from inprogress to verify
  • Resolution set to fixed

Branch: feature/8971_cancel_algs_from_script

Tester: I have attached 3 scripts as required. The first demonstrates cancelling the MonitorLiveData algorithm after a certain time and after a certain number of events have been captured. The final 2 are meant to be used together:

  • test_live_cancel_different_script1.py - Starts a live data capture algorithm
  • test_live_cancel_different_script2.py - Cancels the newest instance of a running MonitorLiveData algorithm

comment:12 Changed 7 years ago by Russell Taylor

  • Status changed from verify to verifying
  • Tester set to Russell Taylor

comment:13 Changed 7 years ago by Martyn Gigg

Remove commented-out code from AlgorithmManager export file.

Refs #8971

Changeset: caf7b9dbd3c2339bc411dcc1e0e59b85612d6a7b

comment:14 Changed 7 years ago by Martyn Gigg

Allow overriding Algorithm::isRunning in Python

Refs #8971

Changeset: 58ddd91bd4a04eeaecb40cee0db325dd2eada901

comment:15 Changed 7 years ago by Martyn Gigg

Allow Algorithm::cancel to be overridden in Python

Move Algorithm::cancel test to PythonAlgorithm test so it is more reliable and doesn't rely on timings. Refs #8971

Changeset: 917a7e675386d9aa12bdeed9416bcbd484dcf73b

comment:16 Changed 7 years ago by Martyn Gigg

Remove cerr debug statement & fix typo in comment.

Refs #8971

Changeset: 4a5ab98319206a1945e3b9bebab5573e65b6e295

comment:17 Changed 7 years ago by Russell Taylor

  • Status changed from verifying to closed

Merge remote-tracking branch 'origin/feature/8971_cancel_algs_from_script'

Full changeset: 2c1b1dd5fb185146cee0c48601aedea43348159c

comment:18 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 9814

Note: See TracTickets for help on using tickets.