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

Pb 15 testing #6

Merged
merged 5 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 33 additions & 33 deletions .github/workflows/versioning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion application/backend/app/services/event_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion application/bot/src/scheduler/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions infrastructure/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/variables.tf
Original file line number Diff line number Diff line change
@@ -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" {
Expand Down