Skip to content

Commit

Permalink
Retain existing lambdas
Browse files Browse the repository at this point in the history
  • Loading branch information
aloftus23 committed Dec 11, 2024
1 parent 7bebe7b commit 2cc9d6f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 28 deletions.
29 changes: 1 addition & 28 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,28 +117,8 @@ jobs:
DB_USERNAME: crossfeed
DB_PASSWORD: password

build_worker:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Restore npm cache
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Build worker container
run: npm run build-worker
working-directory: ./backend

deploy_staging:
needs: [build_worker, lint, test, test_worker]
needs: [lint, test, test_worker]
runs-on: ubuntu-latest
environment: staging
concurrency: '1'
Expand Down Expand Up @@ -234,13 +214,6 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SLS_DEBUG: '*'

- name: Deploy worker
run: npm run deploy-worker-integration
working-directory: backend
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

- name: Run syncdb
run: |
aws lambda invoke --function-name crossfeed-integration-syncdb \
Expand Down
1 change: 1 addition & 0 deletions backend/src/api/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ api:
path: /{any+}
method: ANY
cors: true
existingArn: arn:aws:lambda:us-east-1:957221700844:function:crossfeed-integration-api
8 changes: 8 additions & 0 deletions backend/src/tasks/functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,39 @@ scheduler:
- schedule: rate(5 minutes)
reservedConcurrency: 1
memorySize: 4096
existingArn: arn:aws:lambda:us-east-1:957221700844:function:crossfeed-integration-scheduler

syncdb:
timeout: 900
handler: src/xfd_django/xfd_api/tasks/run_syncdb.handler
existingArn: arn:aws:lambda:us-east-1:957221700844:function:crossfeed-integration-syncdb

pesyncdb:
timeout: 900
handler: src/tasks/pesyncdb.handler
existingArn: arn:aws:lambda:us-east-1:957221700844:function:crossfeed-integration-pesyncdb

bastion:
timeout: 900
handler: src/xfd_django/xfd_api/tasks/bastion.handler
existingArn: arn:aws:lambda:us-east-1:957221700844:function:crossfeed-integration-bastion

makeGlobalAdmin:
handler: src/tasks/makeGlobalAdmin.handler
existingArn: arn:aws:lambda:us-east-1:957221700844:function:crossfeed-integration-makeGlobalAdmin

checkUserExpiration:
timeout: 300
handler: src/tasks/checkUserExpiration.handler
events:
- schedule: cron(0 0 * * ? *) # Runs every day at midnight
existingArn: arn:aws:lambda:us-east-1:957221700844:function:crossfeed-integration-checkUserExpiration

scanExecution:
timeout: 900 # 15 minutes
handler: src/tasks/scanExecution.handler
memorySize: 4096
existingArn: arn:aws:lambda:us-east-1:957221700844:function:crossfeed-integration-scanExecution

updateScanTaskStatus:
handler: src/tasks/updateScanTaskStatus.handler
Expand All @@ -47,6 +54,7 @@ updateScanTaskStatus:
detail:
clusterArn:
- ${file(env.yml):${self:provider.stage}-ecs-cluster, ''}
existingArn: arn:aws:lambda:us-east-1:957221700844:function:crossfeed-integration-updateScanTaskStatus

# populateServiceStatsElasticache:
# handler: src/xfd_django/xfd_api/tasks/elasticache_tasks.populate_ServicesStatscache
Expand Down

0 comments on commit 2cc9d6f

Please sign in to comment.