diff --git a/.github/workflows/versioning.yml b/.github/workflows/versioning.yml index 61d3cb7d..f8d44caa 100644 --- a/.github/workflows/versioning.yml +++ b/.github/workflows/versioning.yml @@ -13,42 +13,42 @@ jobs: build: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.sha }} - fetch-depth: '0' - - name: Set up Node.js - uses: actions/setup-node@v3 - - name: Install dependencies - run: npm install - working-directory: application/frontend - - name: Build bundle - run: npm run build:production - working-directory: application/frontend - env: - BACKEND_URI: https://api.bot.blank.pizza - - name: Remove build gitignore - run: rm public/.gitignore - working-directory: application/frontend - - uses: stefanzweifel/git-auto-commit-action@v4 - with: - commit_message: Automated Build - branch: build - push_options: '--force' - create_branch: true + - uses: actions/checkout@v3 + with: + ref: ${{ github.sha }} + fetch-depth: "0" + - name: Set up Node.js + uses: actions/setup-node@v3 + - name: Install dependencies + run: npm install + working-directory: application/frontend + - name: Build bundle + run: npm run build:production + working-directory: application/frontend + env: + BACKEND_URI: https://api.pizzabot.app + - name: Remove build gitignore + run: rm public/.gitignore + working-directory: application/frontend + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Automated Build + branch: build + push_options: "--force" + create_branch: true create-tag: needs: build runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 - with: - ref: build - fetch-depth: '0' + - uses: actions/checkout@v3 + with: + ref: build + fetch-depth: "0" - - name: Bump version and push tag - uses: anothrNick/github-tag-action@1.55.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - WITH_V: true - DEFAULT_BRANCH: build + - name: Bump version and push tag + uses: anothrNick/github-tag-action@1.55.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + WITH_V: true + DEFAULT_BRANCH: build diff --git a/application/backend/app/services/event_service.py b/application/backend/app/services/event_service.py index a4bf6314..ce27970a 100644 --- a/application/backend/app/services/event_service.py +++ b/application/backend/app/services/event_service.py @@ -14,7 +14,7 @@ class EventService: def get_events_in_need_of_invitations(self): - days_in_advance_to_invite = current_app.config["DAYS_IN_ADVANCE_TO_INVITE"] + days_in_advance_to_invite = int(current_app.config["DAYS_IN_ADVANCE_TO_INVITE"]) return EventRepository.get_events_in_need_of_invitations(days_in_advance_to_invite=days_in_advance_to_invite) def finalize_event_if_complete(self, event_id): diff --git a/application/bot/src/scheduler/__init__.py b/application/bot/src/scheduler/__init__.py index 74186322..b7c4f73c 100644 --- a/application/bot/src/scheduler/__init__.py +++ b/application/bot/src/scheduler/__init__.py @@ -13,7 +13,7 @@ def auto_reply(): with injector.get(BotApi) as ba: ba.auto_reply() -@scheduler.scheduled_job('interval', id='invite_multiple_if_needed', minutes=15, jitter=120) +@scheduler.scheduled_job('interval', id='invite_multiple_if_needed', minutes=3, jitter=0) def invite_multiple_if_needed(): logger = injector.get(logging.Logger) logger.info("Inviting multiple if need on scheduled task") diff --git a/infrastructure/main.tf b/infrastructure/main.tf index ea7820f1..bf8230f5 100644 --- a/infrastructure/main.tf +++ b/infrastructure/main.tf @@ -12,7 +12,7 @@ module "production" { source = "./system" heroku_team_name = var.heroku_team_name - hostname = "bot.blank.pizza" + hostname = "pizzabot.app" prefix = var.prefix environment = "prod" CLOUDAMQP_PLAN = "cloudamqp:tiger" @@ -40,8 +40,8 @@ module "production" { HOURS_BETWEEN_REMINDERS = 4 REPLY_DEADLINE_IN_HOURS = 24 FLASK_ENV = "production" - BACKEND_URI = "api.bot.blank.pizza" - FRONTEND_URI = "bot.blank.pizza" + BACKEND_URI = "api.pizzabot.app" + FRONTEND_URI = "pizzabot.app" } # Add production apps to pipeline under production stage diff --git a/infrastructure/variables.tf b/infrastructure/variables.tf index ecb2cee7..8bc88c5a 100644 --- a/infrastructure/variables.tf +++ b/infrastructure/variables.tf @@ -1,7 +1,7 @@ variable "prefix" { description = "High-level name of this configuration, used as a resource name prefix" type = string - default = "pizzabot-v2" + default = "pizzabot-v3" } variable "heroku_api_key" {