Project

General

Profile

Actions

Task #3266

closed

Task #3262: Improve the way scheduled tasks are presented

Scheduler tasks - sort by trigger start time

Added by Boris Polák about 1 year ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Jan Potočiar
Category:
Scheduler
Target version:
Start date:
03/06/2023
Due date:
% Done:

100%

Estimated time:
24.00 h
Owner:

Description

Allow to sort scheduled tasks by trigger start time


Files

scheduler_nextFireTime_response.png (226 KB) scheduler_nextFireTime_response.png Boris Polák, 03/06/2023 09:10 AM
scheduler_nextFireTime_ui.png (278 KB) scheduler_nextFireTime_ui.png Boris Polák, 03/06/2023 09:10 AM
response.json (104 KB) response.json Jan Potočiar, 03/31/2023 07:31 AM
Actions #1

Updated by Boris Polák about 1 year ago

  • Status changed from New to In Progress
Actions #2

Updated by Tomáš Doischer about 1 year ago

  • Sprint set to Sprint 13.1-2 (bře 08 - bře 22)
  • Estimated time set to 24.00 h
Actions #3

Updated by Tomáš Doischer about 1 year ago

  • Sprint changed from Sprint 13.1-2 (bře 08 - bře 22) to Sprint 13.1-3 (bře 22 - dub 05)
Actions #4

Updated by Jan Potočiar about 1 year ago

  • % Done changed from 0 to 50
Actions #5

Updated by Jan Potočiar about 1 year ago

  • File response.json response.json added
  • Status changed from In Progress to Needs feedback
  • Assignee changed from Jan Potočiar to Peter Štrunc
  • % Done changed from 50 to 80
Introduced new endpoint: /upcoming-tasks
It is very similar to /scheduler/tasks with few differences:
  1. Only tasks with defined nextFireTime are listed
    • consequence: tasks without triggers or only dependent triggers are not listed (in the main list of tasks)
  2. New field introduced to each task: dependentTasks
    • this new field contains list of tasks that are dependent on the task
Cron trigger change: introduced field nextFireTimes and query parametres nextFireTimesLimitCount and nextFireTimesLimitSeconds
  • list of next fire times, limited by time (seconds from now) or count (total size)
    • whichever limit is lower will apply
  • nextFireTimesLimitCount default value is 1
  • nextFireTimesLimitSeconds default value is 1 day
Things good to know:
  • the main list only contains tasks with Cron or simple trigger (consequence of 1))
  • each task contained in the main list is there only once (even when it is executed more than 1 time)
    • the information about multiple times of executions is in the triggers of the task
Questions (known issues):
  • It is not possible to say something like "I want all tasks that will be executed in next 24 hours"
    • the main list of tasks itself is unlimited - should I implement something like this?
    • it is only possible to limit cron triggers like that
  • Since cron triggers received new field nextFireTimes which also contains nextFireTime as its first value, the field nextFireTime is redundant from the data perspective in most cases
    • I kept the field in there because it is used in a different way than nextFireTimes
      • The workaround would be too complicated if we wanted to get rid of the data redundancy IMO

Example response -> https://redmine.czechidm.com/attachments/download/1212
PR: https://github.com/bcvsolutions/CzechIdMng/pull/362

Actions #6

Updated by Tomáš Doischer about 1 year ago

  • Sprint changed from Sprint 13.1-3 (bře 22 - dub 05) to Sprint 13.1-4 (dub 05 - dub 19)
Actions #7

Updated by Peter Štrunc about 1 year ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Peter Štrunc to Jan Potočiar
  • % Done changed from 80 to 100

PR merged. Thanks

Actions #8

Updated by Peter Štrunc 6 months ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF