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

Missing check about running processes #2

Closed
blizzz opened this issue Dec 9, 2016 · 1 comment
Closed

Missing check about running processes #2

blizzz opened this issue Dec 9, 2016 · 1 comment
Milestone

Comments

@blizzz
Copy link
Member

blizzz commented Dec 9, 2016

There is no lockfile, flag or other control that indicates that preview generation is still running. Thus, when running ./occ preview:pre-generate it will just start to do the same tasks. Depending on the activity on the instance, one run of ./occ preview:pre-generate can already take a long time. So there is the chance that previews for each file are generated twice or multiple files (and making them processes run even longer).

@rullzer
Copy link
Member

rullzer commented Mar 14, 2017

Ok so I finally also got bit by this. Thing is that if something goes wrong in the preview generation and php errors out (out of ram, gd error) a lockfile would not be ideal.

So what should solve it I think

  1. When running the preGenerate just update the value after each file. Yes sure not awesome but when generating previews I really don't care about the extra query.
  2. When done with the command clear the value
  3. When a new command is launched. If the value is set but more than 30 minutes ago we assume it crashed.

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

No branches or pull requests

2 participants