Develop#16
Conversation
Qodana for JVMIt seems all right 👌 No new problems were found according to the checks applied ☁️ View the detailed Qodana report Contact Qodana teamContact us at qodana-support@jetbrains.com
|
There was a problem hiding this comment.
Pull request overview
Adjusts the JSA Activity Mode background job scheduling/behavior to better support JSA testing, and updates bundled portable artifacts tracked via Git LFS.
Changes:
- Reduced the default
JsaActivityModejob interval inLocalBackgroundService(12h → 2h). - Added weekday/working-hours gating to
JsaActivityModeJoband shortened the per-iteration random delay. - Updated Git LFS pointers for portable
JobTrackerzip split parts (x86/x64).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Services/LocalBackgroundService.cs | Changes default scheduling interval for the JSA Activity Mode background job. |
| Services/JsaActivityModeJob.cs | Adds “active hours” skip logic and increases iteration frequency (shorter delays). |
| Portable/JobTracker-x86.zip.001 | Updates Git LFS pointer to new portable artifact part. |
| Portable/JobTracker-x86.zip.002 | Updates Git LFS pointer to new portable artifact part. |
| Portable/JobTracker-x64.zip.001 | Updates Git LFS pointer to new portable artifact part. |
| Portable/JobTracker-x64.zip.002 | Updates Git LFS pointer to new portable artifact part. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| _logger.LogInformation("[JsaActivityMode] Starting — will run for up to {Hours} hours", MaxRunDuration.TotalHours); | ||
|
|
||
| var deadline = DateTime.Now.Add(MaxRunDuration); |
There was a problem hiding this comment.
The “Only run on weekdays between 08:00 and 18:00” guard is only evaluated once at the start. If the job starts before 18:00 it can keep running (and making changes) well past 18:00 until MaxRunDuration expires. Consider enforcing the time window inside the main loop (or setting the deadline to the earlier of now.Add(MaxRunDuration) and today’s 18:00) so activity never occurs outside the stated hours.
| _logger.LogInformation("[JsaActivityMode] Starting — will run for up to {Hours} hours", MaxRunDuration.TotalHours); | |
| var deadline = DateTime.Now.Add(MaxRunDuration); | |
| var maxDeadline = now.Add(MaxRunDuration); | |
| var activeWindowEnd = new DateTime(now.Year, now.Month, now.Day, 18, 0, 0, now.Kind); | |
| var deadline = maxDeadline < activeWindowEnd ? maxDeadline : activeWindowEnd; | |
| _logger.LogInformation("[JsaActivityMode] Starting — will run for up to {Hours} hours", MaxRunDuration.TotalHours); |
| { | ||
| _logger.LogInformation("[JsaActivityMode] Outside active hours ({DayOfWeek} {Time:HH:mm}) — skipping", | ||
| now.DayOfWeek, now); | ||
| return; | ||
| } |
There was a problem hiding this comment.
Returning early here will still be treated by LocalBackgroundService.RunSafe as a successful run: it logs “[Background] Completed…”, sets LastRun, and the UI will show the job as OK even though it was skipped. If you want “skipped due to schedule” to be visible/accurate, consider signaling a distinct “skipped” outcome (e.g., return a status/result that RunSafe can interpret, or move the schedule gating into the scheduler so LastRun isn’t updated on skips).
JSA testing fix