Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/disable jobs via api #112

Merged
merged 5 commits into from
Jan 3, 2024
Merged

Conversation

saschadoemer
Copy link
Contributor

Closes #111

This update introduces the functionality to disable certain jobs for specific manufacturers. The feature includes addition of a new 'DisabledJob' class to facilitate this. Methods to disable a job and to check whether a job is disabled for a given manufacturer have been added to the 'ApplicationData' and 'ApplicationDataRepository' classes.
The DataImportScheduler constructor has been streamlined by using Lombok's @requiredargsconstructor annotation. Further, the job checking function in ApplicationDataRepository has been switched from 'isTheJobDisabled' to 'isTheJobEnabled' to improve code readability. Now, the data import job is only initiated if it's enabled both by the application configuration and the job checking function.
The ApplicationData class has been updated to include the manufacturer in the DisabledJob object. This new property will be set whenever a job is disabled. This addition will enable the distinguishing of jobs based on manufacturers.
A new endpoint '/job' has been introduced in BaseMappings. JobController class is added to manage job-related operations. Additionally, added a new DTO - DisableJobRequest, representing a request to disable a job, which includes manufacturer details. This will allow disabling jobs for a specific manufacturer.
This update adds a new endpoint '/v1/job' to the OpenAPI specification, specifically to include a 'patch' operation that disables a job for a manufacturer. It also introduces a 'DisableJobRequest' schema that outlines the structure of the request body for this operation, including necessary manufacturer details.
@Vitrum-LL Vitrum-LL added this pull request to the merge queue Jan 3, 2024
Merged via the queue into main with commit 21520a0 Jan 3, 2024
1 check passed
@saschadoemer saschadoemer deleted the feature/disable-jobs-via-api branch January 5, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deaktiveren der Imports für die verschiedenen Sensoren per API
2 participants