-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix for experiment schedular not working due to cyclic services depenency and findby() old syntax #2136
Conversation
…ency and findby old syntax
@@ -28,7 +28,7 @@ export class ScheduledJobService { | |||
return await this.dataSource.transaction(async (transactionalEntityManager) => { | |||
try { | |||
const scheduledJobRepository = transactionalEntityManager.getRepository(ScheduledJob); | |||
const scheduledJob = await scheduledJobRepository.findOne({ where: { id }, relations: ['experiment'] }); | |||
const scheduledJob = await scheduledJobRepository.findOne({ where: { id: id }, relations: ['experiment'] }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new syntax was required for typeorm v0.3 upgrade. Without this the findOne would not return data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already in a new syntax. The only change I can see is {id} => {id: id}
which is redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VivekFitkariwala Fixed. Thanks.
backend/packages/Upgrade/src/api/services/ScheduledJobService.ts
Outdated
Show resolved
Hide resolved
@VivekFitkariwala Please check this: https://www.npmjs.com/package/typeorm ![]() |
This PR resolves #2135