Opened 14 years ago

Closed 2 years ago

#7990 closed Developer Task (Trac EOL)

Rework of status handling in mythjobqueue

Reported by: Raymond Wagner Owned by: Raymond Wagner
Priority: major Milestone: 29.2
Component: MythTV - Mythjobqueue Version: Master Head
Severity: low Keywords:
Cc: Ticket locked: no

Description

The goal of this task is to remove (most of) the custom handling of mythcommflag and mythtranscode within the jobqueue code. The jobqueue will only be responsible for startup and success/failure logs and status updates. The jobs themselves will be responsible for any task specific information displayed in the terminal logs, database logs, or jobqueue table.

Attachments (1)

nooverwrite_comment.patch (609 bytes) - added by Raymond Wagner 14 years ago.
Initial patch to only update comment on a status change.

Download all attachments as: .zip

Change History (18)

Changed 14 years ago by Raymond Wagner

Attachment: nooverwrite_comment.patch added

Initial patch to only update comment on a status change.

comment:1 Changed 14 years ago by Raymond Wagner

(In [23360]) Alter the jobqueue to only change the comment on a job if the status is being changed. This allows userjobs to provide custom exit codes in the comments without them being immediately overwritten by the jobqueue code. Refs #7990.

comment:2 Changed 14 years ago by Raymond Wagner

Milestone: 0.240.25

comment:3 Changed 14 years ago by robertm

Status: newassigned

comment:4 Changed 13 years ago by stuartm

Milestone: 0.25

Milestone 0.25 deleted

comment:5 Changed 12 years ago by Raymond Wagner

Milestone: 0.250.26

comment:6 Changed 12 years ago by stuartm

Type: taskDeveloper Task

comment:7 Changed 12 years ago by Raymond Wagner

Milestone: 0.260.27
Priority: minormajor

comment:8 Changed 11 years ago by Raymond Wagner

Milestone: 0.270.28

comment:9 Changed 9 years ago by Stuart Auchterlonie

Version: headMaster Head

comment:10 Changed 9 years ago by Jim Stichnoth <jstichnoth@…>

In b43b11ca3062086d20ee0072368e9dd3646a5faa/mythtv:

Reduce "Watch Recordings" sluggishness by caching jobqueue state.

Refs #8962, refs #7990.

Currently, when navigating the Watch Recordings screen, every time the
cursor position is moved, 4 jobqueue queries are issued for each item
visible on the screen (the actual number being controlled by the
theme). These queries are done within the UI thread, which makes
navigation noticeably sluggish on most any setup that isn't a
moderately powerful combined frontend/backend.

Ideally, any time a job's status changes (including queue addition and
removal), we would call ProgramInfo::SendUpdateEvent?() to get the
Watch Recordings entry updated, along with any other
ProgramInfoUpdater? subscribers. Also,
ProgramInfo::LoadProgramFromRecorded?() and LoadFromRecorded?() would
set up the necessary commflag and transcode flags in the ProgramInfo?
object.

However, in the current jobqueue implementation, this is not very
practical because of functions like:

JobQueue::DeleteJob?(int jobID)
JobQueue::ChangeJobCmds?(int jobID, int newCmds)
JobQueue::ChangeJobFlags?(int jobID, int newFlags)
JobQueue::ChangeJobStatus?(int jobID, int newStatus, QString comment)
JobQueue::ChangeJobComment?(int jobID, QString comment)
JobQueue::ChangeJobArgs?(int jobID, QString args)
JobQueue::ChangeJobHost?(int jobID, QString newHostname)
JobQueue::CleanupOldJobsInQueue?()

where the ProgramInfo? isn't readily available (though it could be
found given another query on jobID for all but the last function).

Instead, in this approach, the PlaybackBox? locally caches the jobqueue
contents, reloading every 15 seconds as needed. The reload blocks the
UI thread, but only for a small fraction of the time that the current
implementation was blocking it, so it's unlikely a user pay much
attention to this once-in-15-seconds query.

This code should be removed once #7990 makes jobs more autonomous.

comment:11 Changed 9 years ago by Jim Stichnoth <jstichnoth@…>

In 974d1ae9b6fe2f12b8cfc48aafcf10fc730e414e/mythtv:

Reduce "Watch Recordings" sluggishness by caching jobqueue state.

Refs #8962, refs #7990.

This is essentially a cherry-pick of b43b11ca.

comment:12 Changed 8 years ago by Stuart Auchterlonie

Milestone: 0.280.29

comment:13 Changed 8 years ago by Stuart Auchterlonie

Milestone: 0.2929.0

Milestone renamed

comment:14 Changed 6 years ago by Stuart Auchterlonie

Milestone: 29.029.1

comment:15 Changed 6 years ago by Stuart Auchterlonie

Milestone: 29.10.28.2

Moving remaining open tickets to 0.28.2 milestone

comment:16 Changed 6 years ago by Stuart Auchterlonie

Milestone: 0.28.229.2

Moving remaining open tickets to 29.2 milestone

comment:17 Changed 2 years ago by Stuart Auchterlonie

Resolution: Trac EOL
Status: assignedclosed

We have moved all bug tracking to github [1]

If you continue to have this issue, please open a new issue at github, referencing this ticket.

[1] - https://github.com/MythTV/mythtv/issues

Note: See TracTickets for help on using tickets.