Skip to content

Comments

Async#3773

Merged
Frooodle merged 13 commits intomainfrom
async
Jun 23, 2025
Merged

Async#3773
Frooodle merged 13 commits intomainfrom
async

Conversation

@Frooodle
Copy link
Member

@Frooodle Frooodle commented Jun 19, 2025

Description of Changes

This pull request introduces a job management system with enhanced capabilities for handling asynchronous tasks, file operations, and progress tracking. Key changes include the addition of new annotations and aspects for job execution, file management services, and models for job progress and results.

Job Execution Enhancements:

File Management:

Job Models:

Other Changes:

@github-actions github-actions bot added Java Pull requests that update Java code Test Testing-related issues or pull requests labels Jun 19, 2025
@Frooodle Frooodle marked this pull request as ready for review June 19, 2025 11:30
Copilot AI review requested due to automatic review settings June 19, 2025 11:30
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines ignoring generated files. enhancement New feature or request labels Jun 19, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces a comprehensive job management system that supports asynchronous job execution, dynamic file handling, and progress tracking. Key changes include enhancements to job execution via new annotations and an aspect, new services for file storage and job management, and a set of extensive tests covering these new features.

Reviewed Changes

Copilot reviewed 20 out of 28 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
common/src/test/java/stirling/software/common/service/*.java Unit tests for TaskManager, ResourceMonitor, JobQueue, JobExecutorService, and FileStorage.
common/src/main/java/stirling/software/common/annotations/*.java Integration and annotation-based job execution (AutoJobPostMapping and AutoJobAspect).
common/src/main/java/stirling/software/common/util/*.java Utility classes for Spring context and executor service.
common/src/main/java/stirling/software/common/model/job/*.java New job model classes for progress, result, response, and statistics.
common/src/main/java/stirling/software/common/model/api/PDFFile.java Updated PDFFile model to support server-side file references.
common/build.gradle Added AOP dependency to support aspect‐oriented programming.

Comment on lines 238 to 239
// Use Spring's BeanUtils to copy all properties, avoiding missed fields if PDFFile grows
BeanUtils.copyProperties(pdfFile, pdfFileCopy);
Copy link

Copilot AI Jun 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] The use of BeanUtils.copyProperties to deep copy PDFFile objects might introduce performance overhead for large file payloads. It is worth evaluating whether this copying is necessary or if the file data can be managed more efficiently.

Suggested change
// Use Spring's BeanUtils to copy all properties, avoiding missed fields if PDFFile grows
BeanUtils.copyProperties(pdfFile, pdfFileCopy);
// Manually copy necessary properties to avoid performance overhead
pdfFileCopy.setFileId(pdfFile.getFileId());
pdfFileCopy.setFileInput(pdfFile.getFileInput());
pdfFileCopy.setFileName(pdfFile.getFileName());
pdfFileCopy.setFileSize(pdfFile.getFileSize());

Copilot uses AI. Check for mistakes.
reecebrowne
reecebrowne previously approved these changes Jun 19, 2025
…Monitor.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@stirlingbot stirlingbot bot added Gradle Pull requests that update Gradle code and removed enhancement New feature or request labels Jun 20, 2025
try {
isTestEnvironment = Class.forName("org.junit.jupiter.api.Test") != null;
} catch (ClassNotFoundException e) {
// Not in a test environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have a debug message to say it's not a test env here. Up to you though ;)

@Frooodle Frooodle merged commit 7d7f127 into main Jun 23, 2025
17 checks passed
@Frooodle Frooodle deleted the async branch September 22, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gradle Pull requests that update Gradle code Java Pull requests that update Java code size:XXL This PR changes 1000+ lines ignoring generated files. Test Testing-related issues or pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants