Commit 7c0dfe4c authored by Siiri Tann's avatar Siiri Tann
Browse files

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Siiri Tann

See merge request teis/scheduler-service!37
parents b82bca1b 8555e25a
......@@ -2,6 +2,7 @@ stages:
- test
- build
- deploy
- cve-test
variables:
USE_POSTGRES: "true"
......@@ -18,3 +19,5 @@ include:
file: "/gitlab/java/microservice/.gitlab-ci-microservice-build.yml"
- project: "teis/dev-ops"
file: "/gitlab/java/microservice/.gitlab-ci-microservice-deploy.yml"
- project: "teis/dev-ops"
file: "/gitlab/java/microservice/.gitlab-ci-microservice-cve-scan.yaml"
# Changelog
## [1.18.0] - 2022-04-08
* TEIS-2907: added statistics.startTortiQuery job
* TEIS-2587: added new scheduler job accidents.updateIncapacityCertificates
* TEIS-2791: removed unused cache queue from application configuration
## [1.17.0] - 2021-12-16
* TEIS-2599: security and metrics update
......
theGroup=ee.sm.ti.teis
theVersion=1.17.0
commonsVersion=1.28.0
commonApiGatewayVersion=1.28.0
adminApiGatewayVersion=1.12.0
pluginVersion=1.4.1
theVersion=1.18.0
commonsVersion=1.34.0
commonApiGatewayVersion=1.34.0
adminApiGatewayVersion=1.14.3
pluginVersion=1.5.0
package ee.sm.ti.teis.scheduler.admin;
import ee.sm.ti.teis.admingateway.systemjobs.*;
import ee.sm.ti.teis.scheduler.config.QueueConfig;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -9,13 +8,15 @@ import org.springframework.stereotype.Component;
import java.util.List;
import static ee.sm.ti.teis.scheduler.config.QueueConfig.*;
@Component
@RequiredArgsConstructor
public class AdminJobListener {
private final AdminBusinessService adminBusinessService;
@RabbitListener(queues = {QueueConfig.GW_START_ADMIN_JOB})
@RabbitListener(queues = {GW_START_ADMIN_JOB})
@PreAuthorize("@accessController.hasAnyPrivilege({'TI_MANAGE_SYSTEM_JOBS'}, null, null, null)")
public StartSystemJobResponse jobStarted(StartSystemJobRequest request) {
adminBusinessService.startSystemJob(request.getPayload(), request.getRequestMetaDTO());
......@@ -26,7 +27,7 @@ public class AdminJobListener {
return response;
}
@RabbitListener(queues = {QueueConfig.GW_GET_JOB_EXECUTIONS_JOB})
@RabbitListener(queues = {GW_GET_JOB_EXECUTIONS_JOB})
@PreAuthorize("@accessController.hasAnyPrivilege({'TI_MANAGE_SYSTEM_JOBS'}, null, null, null)")
public GetSystemJobsResponse getSystemJobExecutions(GetSystemJobsRequest request) {
List<JobExecutionDto> systemJobExecutions = adminBusinessService.getSystemJobExecutions(request.getPayload());
......@@ -37,7 +38,7 @@ public class AdminJobListener {
return response;
}
@RabbitListener(queues = {QueueConfig.GW_GET_JOB_DEFINITIONS_JOB})
@RabbitListener(queues = {GW_GET_JOB_DEFINITIONS_JOB})
@PreAuthorize("@accessController.hasOfficialPrivilege({'TI_VIEW_SYSTEM_JOBS'})")
public GetSystemJobDefinitionsResponse getSystemJobDefinitions(GetSystemJobDefinitionsRequest request) {
List<JobDefinitionDto> systemJobExecutions = adminBusinessService.getSystemJobs();
......
......@@ -93,8 +93,6 @@ teis:
test:
data:
resetmagic: ${TEST_DATA_RESET_MAGIC:}
cache:
queues: classifierItems
rabbit:
gw-exchange-name: gw_exchange
gw-exchange-reply-timeout: ${RABBIT_TEMPLATE_GW_EXCHANGE_REPLY_TIMEOUT:6000}
......
--liquibase formatted sql
/* @formatter:off */
--changeset siiri:2022-03-31.TEIS-2587.accident-update-period-incapacity-certificates-job
INSERT INTO job_definition (id, name, schedule_type, schedule_cron, schedule_interval, status, created_at) VALUES
('accidents.updateIncapacityCertificates', 'Haigekassast automaatselt TVL-de andmete uuendamine', 'CRON', '0 0 4 * * ?', -1, 'IDLE', NOW());
--liquibase formatted sql
/* @formatter:off */
--changeset hando:2022-04-05.TEIS-2907.statistics-update-job
INSERT INTO job_definition (id, name, schedule_type, schedule_cron, schedule_interval, status, created_at) VALUES
('statistics.startTortiQuery', 'TÖR-ist tehtava töötajate arvu päringu TORTI käivitamine', 'CRON', '0 0 2 ? * * *', -1, 'IDLE', NOW());
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment