[TASKMGMT-21] Task management cannot depend on scheduler module for now Created: 01/Jul/15  Updated: 03/Jul/15  Resolved: 02/Jul/15

Status: Closed
Project: Task Management
Component/s: None
Affects Version/s: 1.1
Fix Version/s: 1.1

Type: Bug Priority: Critical
Reporter: Mikaël Geljić Assignee: Mikaël Geljić
Resolution: Fixed Votes: 0
Labels: scheduler
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
caused by TASKMGMT-18 Allow scheduling tasks Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Since TASKMGMT-18, tasks module has a dependency to scheduler module, so we have a circular dependency: TASK => UI => SCHEDULER => TASK ...

Even the though this circle doesn't show up on CI (milestones, different scheduler version here), it does prevent the empty-webapp from starting, because scheduler is now expected, but not present.

The background story is that currently, scheduler module depends on magnolia-ui.
This is admittedly unfortunate —should be the other way around—, that's why we work around the circular dependency e.g. in AbstractCommandAction.

Therefore we need to apply the same workaround as in UI for now (and find proper degradation in case scheduler's not around).

// get quartz scheduler (same instance as scheduler module)
// due to creation of circular dependency, we can't simply import mgnl scheduler, yet we want to use same factory initialized scheduler in case someone customized it and we want to have all jobs in same group for monitoring purposes
Scheduler scheduler = (Scheduler) schedulerModule.getClass().getMethod("getScheduler").invoke(schedulerModule);


 Comments   
Comment by Mikaël Geljić [ 02/Jul/15 ]
  • Removed maven dependency for now (not module dependency)
  • Moved scheduler from bundled-webapp to empty-webapp
Generated at Mon Feb 12 11:02:19 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.