Skip to content

Commit

Permalink
ATOR-190 - Update intervals
Browse files Browse the repository at this point in the history
  • Loading branch information
yumirkov committed Mar 12, 2024
1 parent 5ff0255 commit f413837
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ services:
volumes:
- ./scanner/.sbws.ini:/root/.sbws.ini
- ./data:/root/.sbws
environment:
INTERVAL_MINUTES: 5
networks:
local:
ipv4_address: 172.18.0.3
Expand Down
4 changes: 2 additions & 2 deletions docker/scanner/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mkdir -p /root/.sbws/log

crontab -l | { cat; echo "*/5 * * * * /usr/local/bin/sbws -c /root/.sbws.ini generate >> /root/.sbws/log/generate.log 2>&1"; } | crontab -
crontab -l | { cat; echo "30 0 * * * /usr/local/bin/sbws -c /root/.sbws.ini cleanup >> /root/.sbws/log/cleanup.log 2>&1"; } | crontab -
crontab -l | { cat; echo "*/$INTERVAL_MINUTES * * * * export INTERVAL_MINUTES=$INTERVAL_MINUTES; /usr/local/bin/sbws -c /root/.sbws.ini generate >> /root/.sbws/log/generate.log 2>&1"; } | crontab -
crontab -l | { cat; echo "35 0 * * * /usr/local/bin/sbws -c /root/.sbws.ini cleanup >> /root/.sbws/log/cleanup.log 2>&1"; } | crontab -

service cron start

Expand Down
4 changes: 4 additions & 0 deletions operations/deploy-dev.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ LearnCircuitBuildTimeout 0
task "sbws-scanner-dev-task" {
driver = "docker"

env {
INTERVAL_MINUTES = "5"
}

volume_mount {
volume = "sbws-dev"
destination = "/root/.sbws"
Expand Down
4 changes: 4 additions & 0 deletions operations/deploy-live.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ LearnCircuitBuildTimeout 0
task "sbws-scanner-live-task" {
driver = "docker"

env {
INTERVAL_MINUTES = "60"
}

volume_mount {
volume = "sbws-live"
destination = "/root/.sbws"
Expand Down
4 changes: 4 additions & 0 deletions operations/deploy-stage.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ LearnCircuitBuildTimeout 0
task "sbws-scanner-stage-task" {
driver = "docker"

env {
INTERVAL_MINUTES = "60"
}

volume_mount {
volume = "sbws-stage"
destination = "/root/.sbws"
Expand Down

0 comments on commit f413837

Please sign in to comment.