Skip to content

Commit

Permalink
chore: update @dcl/schemas to have new DeploymentToSqs type
Browse files Browse the repository at this point in the history
  • Loading branch information
aleortega committed Mar 12, 2024
1 parent 14bbfd0 commit c44eaf6
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions consumer-server/package-lock.json

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

2 changes: 1 addition & 1 deletion consumer-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"dependencies": {
"@dcl/cdn-uploader": "^1.4.1-20230208155013.commit-f75a6ee",
"@dcl/schemas": "^8.2.1-20230713143922.commit-b923191",
"@dcl/schemas": "^10.4.0",
"@well-known-components/env-config-provider": "^1.1.1",
"@well-known-components/http-server": "^1.1.6-20220927190058.commit-2dfb235",
"@well-known-components/interfaces": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions consumer-server/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export async function initComponents(): Promise<AppComponents> {

const sqsQueue = await config.getString('TASK_QUEUE')
const taskQueue = sqsQueue ?
createSqsAdapter<DeploymentToSqs & { lods: string[] | undefined }>({ logs, metrics }, { queueUrl: sqsQueue, queueRegion: AWS_REGION }) :
createMemoryQueueAdapter<DeploymentToSqs & { lods: string[] | undefined }>({ logs, metrics }, { queueName: "ConversionTaskQueue" })
createSqsAdapter<DeploymentToSqs>({ logs, metrics }, { queueUrl: sqsQueue, queueRegion: AWS_REGION }) :
createMemoryQueueAdapter<DeploymentToSqs>({ logs, metrics }, { queueName: "ConversionTaskQueue" })

const s3Bucket = await config.getString('CDN_BUCKET')
const cdnS3 = s3Bucket ? new AWS.S3({}) : new MockAws.S3({})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export async function queueTaskHandler(context: HandlerContextWithPath<"metrics"

if (!DeploymentToSqs.validate(body)) return { status: 403, body: { errors: DeploymentToSqs.validate.errors } }

const message = await taskQueue.publish(body as DeploymentToSqs & { lods: string[] | undefined; })
const message = await taskQueue.publish(body as DeploymentToSqs)

return {
status: 201,
Expand Down
2 changes: 1 addition & 1 deletion consumer-server/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type BaseComponents = {
logs: ILoggerComponent
server: IHttpServerComponent<GlobalContext>
fetch: IFetchComponent
taskQueue: ITaskQueue<DeploymentToSqs & { lods: string[] | undefined }>
taskQueue: ITaskQueue<DeploymentToSqs>
metrics: IMetricsComponent<keyof typeof metricDeclarations>
cdnS3: S3
runner: IRunnerComponent
Expand Down

0 comments on commit c44eaf6

Please sign in to comment.