Skip to content

Fixed query to find pending executions #36

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

Merged
merged 1 commit into from
Feb 27, 2017
Merged

Conversation

wachterjohannes
Copy link
Member

This PR fixes the query for findPending and make it independent from timezone (by using now and give the decision to the database).

@@ -129,17 +129,13 @@ public function findByTaskUuid($taskUuid)
/**
* {@inheritdoc}
*/
public function findScheduled(\DateTime $dateTime = null)
Copy link
Member Author

Choose a reason for hiding this comment

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

the interface has changed a few time ago. so i have removed it also from this class.

@wachterjohannes wachterjohannes force-pushed the bugfix/scheduled-query branch 2 times, most recently from 6542213 to abe23e2 Compare February 27, 2017 12:38
$this->taskRepository = self::$kernel->getContainer()->get('task.storage.task');
}

public function testSave(TaskInterface $task = null, \DateTime $scheduleTime = null, $status = TaskStatus::PLANNED)
Copy link

Choose a reason for hiding this comment

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

Do you really think it is a good idea to reuse the test method? Having the assertions also executed in the other tests feels like something that might bite us one day.

Copy link
Member Author

Choose a reason for hiding this comment

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

but this is a "prerequisite" for the other testcases but i could also extract it to another function.

Copy link

Choose a reason for hiding this comment

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

I would exclude it in another function... There is no need that these tests are executed multiple times within a single run.

@wachterjohannes
Copy link
Member Author

@danrot fixed.

@danrot danrot merged commit b52328d into master Feb 27, 2017
@danrot danrot deleted the bugfix/scheduled-query branch February 27, 2017 13:41
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.

2 participants