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

FEATURE: Timeout option for ImageOptim. #162

Closed
wants to merge 1 commit into from

Conversation

tgxworld
Copy link
Contributor

@tgxworld tgxworld commented Jul 5, 2018

No description provided.

@tgxworld
Copy link
Contributor Author

tgxworld commented Jul 5, 2018

@toy Please review :) Thank you!

@tgxworld tgxworld force-pushed the global_timeout branch 5 times, most recently from 378cd9f to 8390d62 Compare July 5, 2018 07:31
@tgxworld tgxworld closed this Jul 9, 2018
@tgxworld tgxworld reopened this Jul 9, 2018
@tgxworld
Copy link
Contributor Author

tgxworld commented Jul 9, 2018

Not sure what is going on with appveyor here

screenshot from 2018-07-09 10-19-48

@toy
Copy link
Owner

toy commented Jul 22, 2018

I'm also not sure what is with appveyor, but can be ignored till merging.

As I understand you wanted to change worker timeout in #149 to image optimisation timeout as in this PR. I think it is better to already think about possibility of both options. Maybe image_timeout for whole image handling and timeout for worker timeout, do you think it will be clear?

Do I understand right that you want timeout exception to lead to abort of cli?

I think cleanup_process should be in Cmd and not part of ImageOptim class.

@tgxworld
Copy link
Contributor Author

tgxworld commented Aug 9, 2018

As I understand you wanted to change worker timeout in #149 to image optimisation timeout as in this PR. I think it is better to already think about possibility of both options. Maybe image_timeout for whole image handling and timeout for worker timeout, do you think it will be clear?

I'm only looking to implement a global timeout for image optim.

Do I understand right that you want timeout exception to lead to abort of cli?

Yup it should abort the CLI as well :)

@tgxworld tgxworld closed this Aug 29, 2019
oblakeerickson added a commit to oblakeerickson/image_optim that referenced this pull request Oct 23, 2020
This PR addresses the feedback what was originally given on PR toy#162 by
adding a default worker specific timeout option in addition to a global
timeout.

The original commit

discourse@8bf3c0e

on PR toy#162 with just the global timeout has been in production since
2018-07-08 on Discourse instances using a forked version of this gem.

We would like to get this change merged in, so that we can get off of
the discourse specific fork and use the latest version of the
image_optim gem.

Co-authored-by: Blake Erickson <[email protected]>
oblakeerickson pushed a commit to oblakeerickson/image_optim that referenced this pull request Dec 4, 2020
This PR addresses the feedback what was originally given on PR toy#162 by
adding a default worker specific timeout option in addition to a global
timeout.

The original commit

discourse@8bf3c0e

on PR toy#162 with just the global timeout has been in production since
2018-07-08 on Discourse instances using a forked version of this gem.

We would like to get this change merged in, so that we can get off of
the discourse specific fork and use the latest version of the
image_optim gem.

Co-authored-by: Blake Erickson <[email protected]>

Do not raise if optimized before timeout

Based on feedback this commit includes the following changes:

When optimizing multiple images with `optimize_images` a single image
timeout doesn't break execution. The global timeout will still raise an
exception though if it is reached.

When optimizing a single image do not raise an exception if a single
worker has succeeded but has reached the timeout period while running
through the remaining workers.

When optimizing a single image if a single worker times out it will
continue on to the next worker until the global timeout is reached.
oblakeerickson added a commit to oblakeerickson/image_optim that referenced this pull request Feb 12, 2021
Re-opening the original PR toy#162 and replace PR toy#184 (sorry for multiple
PRs).

The original commit

discourse/image_optim@8bf3c0e

on PR toy#162 with just the global timeout has been in production since
2018-07-08 on Discourse instances using a forked version of this gem.

We would like to get this change merged in, so that we can get off of
the discourse specific fork and use the latest version of the
image_optim gem.

Add add some more details in the PR discussion.

Co-authored-by: Blake Erickson <[email protected]>
oblakeerickson added a commit to oblakeerickson/image_optim that referenced this pull request Feb 12, 2021
Re-opening the original PR toy#162 and replacing PR toy#184 (sorry for multiple
PRs).

The original commit

discourse/image_optim@8bf3c0e

on PR toy#162 with just the global timeout has been in production since
2018-07-08 on Discourse instances using a forked version of this gem.

We would like to get this change merged in, so that we can get off of
the discourse specific fork and use the latest version of the
image_optim gem.

Going to add some more details in the PR discussion.

Co-authored-by: Blake Erickson <[email protected]>
okuramasafumi added a commit to okuramasafumi/discourse that referenced this pull request Mar 3, 2021
The previous PR toy/image_optim#162 was closed and
a new PR toy/image_optim#189 has been submitted.
toy pushed a commit that referenced this pull request Mar 14, 2021
Re-opening the original PR #162 and replacing PR #184 (sorry for multiple
PRs).

The original commit

discourse/image_optim@8bf3c0e

on PR #162 with just the global timeout has been in production since
2018-07-08 on Discourse instances using a forked version of this gem.

We would like to get this change merged in, so that we can get off of
the discourse specific fork and use the latest version of the
image_optim gem.

Going to add some more details in the PR discussion.

Co-authored-by: Blake Erickson <[email protected]>
toy pushed a commit that referenced this pull request Mar 19, 2021
Re-opening the original PR #162 and replacing PR #184 (sorry for multiple
PRs).

The original commit

discourse/image_optim@8bf3c0e

on PR #162 with just the global timeout has been in production since
2018-07-08 on Discourse instances using a forked version of this gem.

We would like to get this change merged in, so that we can get off of
the discourse specific fork and use the latest version of the
image_optim gem.

Going to add some more details in the PR discussion.

Co-authored-by: Blake Erickson <[email protected]>
toy pushed a commit to oblakeerickson/image_optim that referenced this pull request Apr 28, 2021
Re-opening the original PR toy#162 and replacing PR toy#184 (sorry for multiple
PRs).

The original commit

discourse/image_optim@8bf3c0e

on PR toy#162 with just the global timeout has been in production since
2018-07-08 on Discourse instances using a forked version of this gem.

We would like to get this change merged in, so that we can get off of
the discourse specific fork and use the latest version of the
image_optim gem.

Going to add some more details in the PR discussion.

Co-authored-by: Blake Erickson <[email protected]>
toy pushed a commit to oblakeerickson/image_optim that referenced this pull request May 9, 2021
Re-opening the original PR toy#162 and replacing PR toy#184 (sorry for multiple
PRs).

The original commit

discourse/image_optim@8bf3c0e

on PR toy#162 with just the global timeout has been in production since
2018-07-08 on Discourse instances using a forked version of this gem.

We would like to get this change merged in, so that we can get off of
the discourse specific fork and use the latest version of the
image_optim gem.

Going to add some more details in the PR discussion.

Co-authored-by: Blake Erickson <[email protected]>
toy pushed a commit to oblakeerickson/image_optim that referenced this pull request May 9, 2021
The original commit discourse/image_optim@8bf3c0e, see discussion in resolved PRs.

Resolves toy#21, resolves toy#148, resolves toy#149, resolves toy#162, resolves toy#184, resolves toy#189.

Co-authored-by: Blake Erickson <[email protected]>
toy added a commit to oblakeerickson/image_optim that referenced this pull request May 9, 2021
The original commit discourse/image_optim@8bf3c0e, see discussion in resolved PRs.

Resolves toy#21, resolves toy#148, resolves toy#149, resolves toy#162, resolves toy#184, resolves toy#189.

Co-authored-by: Blake Erickson <[email protected]>
Co-authored-by: Ivan Kuchin <[email protected]>
toy added a commit that referenced this pull request May 9, 2021
The original commit discourse/image_optim@8bf3c0e, see discussion in resolved PRs.

Resolves #21, resolves #148, resolves #149, resolves #162, resolves #184, resolves #189.

Co-authored-by: Blake Erickson <[email protected]>
Co-authored-by: Ivan Kuchin <[email protected]>
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