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

Optimise Job Progress #4219

Merged
merged 1 commit into from
May 8, 2019
Merged

Conversation

putyourlightson
Copy link

@putyourlightson putyourlightson commented May 6, 2019

The current progress is never updated, resulting in the database being updated regardless of whether the value of $this->_progress has changed or not.

Additionally, $this->_progress should be stored as a rounded integer to avoid updating the database more times than necessary. For example, if there are 1,000 steps then the database will be update 1,000 times instead of the expected 100.

The current progress is never updated, resulting in the database being updated regardless of whether the value of `$this->_progress` has changed or not.

Additionally, `$this->_progress` should be stored as a rounded integer to avoid updating the database more times than necessary. For example, if there are 1,000 steps then the database will be update 10 times more than necessary.

```
1: 0%
2: 0%
...
9: 0%
10: 1%
11: 1%
...
```
@narration-sd
Copy link
Contributor

Great catch, Ben @putyourlightson

@brandonkelly brandonkelly merged commit 394f0a7 into craftcms:develop May 8, 2019
@brandonkelly
Copy link
Member

Thanks!

brandonkelly added a commit that referenced this pull request May 8, 2019
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.

3 participants