Добавил профиль local и вынес крон настройки в application.yml
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0e4939b351
commit
6dcd68655a
@ -32,7 +32,7 @@ public class SchedulerService {
|
|||||||
private final MergeRequestsService mergeRequestsService;
|
private final MergeRequestsService mergeRequestsService;
|
||||||
private final DiscussionService discussionService;
|
private final DiscussionService discussionService;
|
||||||
|
|
||||||
@Scheduled(cron = "0 0 */1 * * *")
|
@Scheduled(cron = "${gitlab-bot.cron.scan.new-project}")
|
||||||
public void newProjects() {
|
public void newProjects() {
|
||||||
log.info("Запуск процесса получение новых репозиториев c GitLab");
|
log.info("Запуск процесса получение новых репозиториев c GitLab");
|
||||||
if (!settingService.isFirstStart()) {
|
if (!settingService.isFirstStart()) {
|
||||||
@ -46,7 +46,7 @@ public class SchedulerService {
|
|||||||
log.info("Конец процесса получение новых репозиториев c GitLab");
|
log.info("Конец процесса получение новых репозиториев c GitLab");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Scheduled(cron = "0 */15 * * * *")
|
@Scheduled(cron = "${gitlab-bot.cron.scan.new-merge-request}")
|
||||||
public void newMergeRequests() {
|
public void newMergeRequests() {
|
||||||
log.info("Запуск процесса получение новых MR c GitLab");
|
log.info("Запуск процесса получение новых MR c GitLab");
|
||||||
if (!settingService.isFirstStart()) {
|
if (!settingService.isFirstStart()) {
|
||||||
@ -55,7 +55,7 @@ public class SchedulerService {
|
|||||||
log.info("Конец процесса получение новых MR c GitLab");
|
log.info("Конец процесса получение новых MR c GitLab");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Scheduled(cron = "0 */1 * * * *")
|
@Scheduled(cron = "${gitlab-bot.cron.scan.general}")
|
||||||
public void newMergeRequest() {
|
public void newMergeRequest() {
|
||||||
log.info("Запуск процесса обновления данных c GitLab");
|
log.info("Запуск процесса обновления данных c GitLab");
|
||||||
if (!settingService.isFirstStart()) {
|
if (!settingService.isFirstStart()) {
|
||||||
|
@ -37,6 +37,11 @@ telegram:
|
|||||||
|
|
||||||
gitlab-bot:
|
gitlab-bot:
|
||||||
version: 0.0.1-SNAPSHOT
|
version: 0.0.1-SNAPSHOT
|
||||||
|
cron:
|
||||||
|
scan:
|
||||||
|
general: "0 */1 * * * *"
|
||||||
|
new-project: "0 0 */1 * * *"
|
||||||
|
new-merge-request: "0 */15 * * * *"
|
||||||
person:
|
person:
|
||||||
telegram-id: ${TELEGRAM_PERSON_ID}
|
telegram-id: ${TELEGRAM_PERSON_ID}
|
||||||
token: ${GITLAB_PERSONAL_TOKEN}
|
token: ${GITLAB_PERSONAL_TOKEN}
|
||||||
@ -58,4 +63,18 @@ gitlab-bot:
|
|||||||
last-commit-of-merge-request-url: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}/commits?&page=1&per_page=1"
|
last-commit-of-merge-request-url: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}/commits?&page=1&per_page=1"
|
||||||
new-note-url: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}/discussions/{2}/notes?body={3}"
|
new-note-url: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}/discussions/{2}/notes?body={3}"
|
||||||
discussions-url: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}/discussions?&page={2,number,#}&per_page={3,number,#}"
|
discussions-url: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}/discussions?&page={2,number,#}&per_page={3,number,#}"
|
||||||
discussion-url: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}/discussions/{2}"
|
discussion-url: "${GITLAB_URL}/api/v4/projects/{0,number,#}/merge_requests/{1,number,#}/discussions/{2}"
|
||||||
|
|
||||||
|
---
|
||||||
|
spring:
|
||||||
|
config:
|
||||||
|
activate:
|
||||||
|
on-profile: local
|
||||||
|
|
||||||
|
gitlab-bot:
|
||||||
|
version: 0.0.1-SNAPSHOT
|
||||||
|
cron:
|
||||||
|
scan:
|
||||||
|
general: "0 */1 * * * *"
|
||||||
|
new-project: "0 */1 * * * *"
|
||||||
|
new-merge-request: "0 */1 * * * *"
|
Loading…
Reference in New Issue
Block a user