Skip to content

Commit

Permalink
feat: updating source for new computer
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonNotJson committed Jun 26, 2023
2 parents d978880 + 3a6e6d7 commit e532167
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 96 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Workflow for installing dependencies"
runs:
using: "composite"
steps:
- uses: pnpm/[email protected].2
- uses: pnpm/[email protected].4
with:
version: latest
- name: Use Node.js
Expand Down
99 changes: 77 additions & 22 deletions lib/configs/event/schedule.ts
Original file line number Diff line number Diff line change
@@ -1,26 +1,81 @@
import * as events from 'aws-cdk-lib/aws-events';

export const syllabusSchedule: { [name: string]: events.Schedule } = {
'regular':
events.Schedule.cron({ minute: '0', hour: '16', day: '1', month: '*', year: '*' }),
'fall-pre':
events.Schedule.cron({ minute: '0', hour: '16', day: '19,21,23', month: 'JUL,AUG', year: '*' }),
'fall-reg1':
events.Schedule.cron({ minute: '0', hour: '16', day: '4,7,10,13,15,17', month: 'SEP', year: '*' }),
'fall-reg2':
events.Schedule.cron({ minute: '0', hour: '16', day: '20,23,25', month: 'SEP', year: '*' }),
'fall-reg3':
events.Schedule.cron({ minute: '0', hour: '16', day: '28,30', month: 'SEP', year: '*' }),
'fall-reg4':
events.Schedule.cron({ minute: '0', hour: '16', day: '3,5,8', month: 'OCT', year: '*' }),
'spring-pre':
events.Schedule.cron({ minute: '0', hour: '16', day: '14,24', month: 'FEB', year: '*' }),
'spring-reg1':
events.Schedule.cron({ minute: '0', hour: '16', day: '4,7,10,13,16,18,21,24,27', month: 'MAR', year: '*' }),
'spring-reg2':
events.Schedule.cron({ minute: '0', hour: '16', day: '3,5,8', month: 'APR', year: '*' }),
'spring-reg3':
events.Schedule.cron({ minute: '0', hour: '16', day: '16,20,24,26,28', month: 'APR', year: '*' }),
'spring-reg4':
events.Schedule.cron({ minute: '0', hour: '16', day: '9,12,14,16', month: 'MAY', year: '*' }),
'regular': events.Schedule.cron({
minute: '0',
hour: '16',
day: '1,12',
month: '*',
year: '*',
}),
'fall-pre': events.Schedule.cron({
minute: '0',
hour: '16',
day: '19,21,23',
month: 'JUL,AUG',
year: '*',
}),
'fall-reg1': events.Schedule.cron({
minute: '0',
hour: '16',
day: '4,7,10,13,15,17',
month: 'SEP',
year: '*',
}),
'fall-reg2': events.Schedule.cron({
minute: '0',
hour: '16',
day: '20,23,25',
month: 'SEP',
year: '*',
}),
'fall-reg3': events.Schedule.cron({
minute: '0',
hour: '16',
day: '28,30',
month: 'SEP',
year: '*',
}),
'fall-reg4': events.Schedule.cron({
minute: '0',
hour: '16',
day: '3,5,8',
month: 'OCT',
year: '*',
}),
'spring-pre': events.Schedule.cron({
minute: '0',
hour: '16',
day: '14,24',
month: 'FEB',
year: '*',
}),
'spring-reg1': events.Schedule.cron({
minute: '0',
hour: '16',
day: '4,7,10,13,16,18,21,24,27',
month: 'MAR',
year: '*',
}),
'spring-reg2': events.Schedule.cron({
minute: '0',
hour: '16',
day: '3,5,8',
month: 'APR',
year: '*',
}),
'spring-reg3': events.Schedule.cron({
minute: '0',
hour: '16',
day: '16,20,24,26,28',
month: 'APR',
year: '*',
}),
'spring-reg4': events.Schedule.cron({
minute: '0',
hour: '16',
day: '9,12,14,16',
month: 'MAY',
year: '*',
}),
};
2 changes: 1 addition & 1 deletion lib/constructs/common/lambda-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ export class ForumThreadFunctions extends Construct {
functionName: 'get-single-thread',
logRetention: logs.RetentionDays.ONE_MONTH,
memorySize: 128,
role: dynamoDBReadRole,
role: dynamoDBPutRole,
runtime: lambda.Runtime.PYTHON_3_9,
timeout: Duration.seconds(3),
environment: props.envVars,
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"@aws-cdk/assert": "2.68.0",
"@commitlint/cli": "17.6.1",
"@commitlint/config-conventional": "17.6.1",
"@types/jest": "29.5.0",
"@types/jest": "29.5.1",
"@types/node": "18.15.12",
"@types/pluralize": "0.0.29",
"@typescript-eslint/eslint-plugin": "5.55.0",
"@typescript-eslint/parser": "5.55.0",
"@typescript-eslint/eslint-plugin": "5.59.6",
"@typescript-eslint/parser": "5.59.6",
"aws-cdk-lib": "2.74.0",
"constructs": "10.1.312",
"esbuild": "^0.17.0",
Expand Down
96 changes: 48 additions & 48 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/lambda/syllabus-scraper/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,6 @@

cron_schedule = ["01-01", "02-01", "02-14", "02-24", "03-01", "03-04", "03-07", "03-10", "03-16", "03-18", "03-21",
"03-24", "03-27", "04-01", "04-03", "04-05", "04-08", "04-16", "04-20", "04-24", "04-26", "04-28",
"05-01", "05-09", "05-12", "05-14", "05-16", "06-01", "07-01", "07-19", "07-21", "07-23", "08-01",
"05-01", "05-09", "05-12", "05-14", "05-16", "06-01", "06-12", "07-01", "07-19", "07-21", "07-23", "08-01",
"08-19", "08-21", "08-23", "09-01", "09-04", "09-07", "09-10", "09-13", "09-15", "09-17", "09-20",
"09-23", "09-25", "09-28", "09-30", "10-01", "10-03", "10-05", "10-08", "11-01", "12-01"]
Loading

0 comments on commit e532167

Please sign in to comment.