Skip to content
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

Merged
merged 3 commits into from
Dec 4, 2024

Conversation

ppratikcr7
Copy link
Collaborator

This PR resolves #2135

@ppratikcr7 ppratikcr7 self-assigned this Nov 26, 2024
@@ -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'] });
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Collaborator Author

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.

Copy link
Collaborator

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VivekFitkariwala Fixed. Thanks.

@ppratikcr7
Copy link
Collaborator Author

ppratikcr7 commented Nov 29, 2024

@VivekFitkariwala Please check this: https://www.npmjs.com/package/typeorm

Screenshot 2024-11-29 at 10 47 32 AM

@ppratikcr7 ppratikcr7 merged commit 8428490 into dev Dec 4, 2024
14 checks passed
@ppratikcr7 ppratikcr7 deleted the bugfix/exp-schedular-not-working-issue-2135 branch December 4, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Experiment Schedular is not working as expected
2 participants