Opened 5 months ago

Closed 4 months ago

Last modified 4 months ago

#2072 closed enhancement (fixed)

Add support for pausing and resuming a job

Reported by: nicklas Owned by: nicklas
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 Changed 5 months ago by nicklas

  • Owner changed from everyone to nicklas
  • Status changed from new to assigned

comment:2 Changed 5 months ago by nicklas

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

Added PAUSE signal and PAUSED job status.

comment:3 Changed 5 months ago by nicklas

(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 Changed 5 months ago by nicklas

(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 Changed 5 months ago by nicklas

(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 Changed 5 months ago by nicklas

(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 Changed 5 months ago by nicklas

(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 Changed 5 months ago by nicklas

(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 Changed 4 months ago by nicklas

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:10 Changed 4 months ago by nicklas

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

Updated documentation with some information about this.

comment:11 Changed 4 months ago by nicklas

(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.