Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2072 closed enhancement (fixed)

Add support for pausing and resuming a job

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: BASE 3.11
Component: core Version:
Keywords: Cc:

Description

This function is similar to the already existing support for restarting a job after a system shutdown. The main difference is that manual user interaction is required to restart the job again.

We should define a PAUSE signal in the signalling system. Plug-ins can implement support for this via the existing EnhancedThreadSignalHandler.

In the view job dialog we should display a PAUSE button so that the user can pause the job. Clicking on the button will send the PAUSE signal to the plug-in which uses the existing Response interface (we need to add some new methods here) to return control back to the core. It should be possible for the plug-in to store some kind of state information. I think we can use the static cache for this. The core will set the job status to PAUSED.

A PAUSED job remains in the job queue. The view dialog will have the option to RESUME or RECONFIGURE the job. When re-starting the job, the saved state information will also be restored.

NOTE! A plug-in may use the pause functionality without implementing support for the PAUSE signal.

Change History (11)

comment:1 by Nicklas Nordborg, 8 years ago

Owner: changed from everyone to Nicklas Nordborg
Status: newassigned

comment:2 by Nicklas Nordborg, 8 years ago

(In [7319]) References #2072: Add support for pausing and resuming a job

Added PAUSE signal and PAUSED job status.

comment:3 by Nicklas Nordborg, 8 years ago

(In [7320]) References #2072: Add support for pausing and resuming a job

Added support in the web interface for pausing and resuming jobs.

  • Running jobs that supports the PAUSE signal get a "Pause" button in the view dialog.
  • There is also a "Pause" button in the list view that can pause multiple jobs in one go.
  • Jobs that are in the PAUSED state get access to the regular "Restart" and "Reconfigure" buttons. They should work just as for jobs that has ended with an error.

Note that there is not yet any way for a plug-in that responds to the PAUSE signal to tell the core that it actually has been paused.

comment:4 by Nicklas Nordborg, 8 years ago

(In [7321]) References #2072: Add support for pausing and resuming a job

Added support in the plug-in API for a plugin to respond with setPause(). There is not yet anything behind it though.

comment:5 by Nicklas Nordborg, 8 years ago

(In [7322]) References #2072: Add support for pausing and resuming a job

It should now work to set the status to PAUSED and save/restore the state information that the plug-in wants to keep.

comment:6 by Nicklas Nordborg, 8 years ago

(In [7323]) References #2072: Add support for pausing and resuming a job

The saved state information should be removed once it has been loaded and handed out to the plug-in again. If the plug-in wants to pause again it need to supply new state information.

comment:7 by Nicklas Nordborg, 8 years ago

(In [7325]) References #2072: Add support for pausing and resuming a job

The next execution command should be cleared when the job has ended or it will be "possible" to resume a failed job from a breakpoint that may no longer exists (if the job saved state information).

comment:8 by Nicklas Nordborg, 8 years ago

(In [7326]) References #2072: Add support for pausing and resuming a job

The "Pause" button should not have any ellipsis since it doesn't open any popup or dialog.

comment:9 by Nicklas Nordborg, 8 years ago

Resolution: fixed
Status: assignedclosed

comment:10 by Nicklas Nordborg, 8 years ago

(In [7342]) References #2072: Add support for pausing and resuming a job

Updated documentation with some information about this.

comment:11 by Nicklas Nordborg, 8 years ago

(In [7355]) References #2072: Add support for pausing and resuming a job

Fixed a NullPointerExceptin when creating a plug-in configuration (job==null).

Note: See TracTickets for help on using tickets.