Skip to content
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
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
working-directory: deployments/docker-swarm-terraform
env:
CPU_LIMIT: ${{ vars.CPU_LIMIT }}
MEMORY_LIMIT: ${{ vars.MEMORY_LIMIT }}
run: |
eval "$(ssh-agent -s)"
ssh-add <(echo "${{ secrets.SSH_PRIVATE_KEY }}")
Expand All @@ -54,4 +53,5 @@ jobs:
-var "app-version=${{ needs.build.outputs.app-version }}" \
-var 'app-host=${{ secrets.APP_HOST }}' \
-var "app-config-b64=${{ secrets.APP_CONFIG_B64 }}" \
-var "app-env-json-b64=${{ secrets.APP_ENV_JSON_B64 }}"
-var "app-env-json-b64=${{ secrets.APP_ENV_JSON_B64 }}" \
-var "memory-limit=${{ vars.MEMORY_LIMIT }}"
2 changes: 1 addition & 1 deletion deployments/docker-swarm-terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ resource "docker_service" "app" {
}

reservation {
memory_bytes = 16 * 1024 * 1024
memory_bytes = 32 * 1024 * 1024
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion deployments/docker-swarm-terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ variable "app-env-json-b64" {
variable "memory-limit" {
type = number
description = "Memory limit in bytes"
default = 32 * 1024 * 1024
default = 64 * 1024 * 1024
}

3 changes: 2 additions & 1 deletion internal/sms-gateway/repositories/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ type MessagesRepository struct {
func (r *MessagesRepository) SelectPending(deviceID string) (messages []models.Message, err error) {
err = r.db.
Where("device_id = ? AND state = ?", deviceID, models.ProcessingStatePending).
Order("id").
Order("id DESC").
Limit(100).
Preload("Recipients").
Find(&messages).
Error
Expand Down