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

Add handler to clear opcache #38

Merged

Conversation

mglaman
Copy link
Contributor

@mglaman mglaman commented Apr 19, 2017

This clears opcache via drush eval instead of restarting the webserver
or the php-fpm service.

My go at a solution for #35

@@ -0,0 +1,5 @@
---
- name: clear opcache
command: drush eval "if (function_exists('apc_clear_cache')) {apc_clear_cache();}if (function_exists('opcache_reset')) {opcache_reset();}"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should use {{ drush_path }} rather than rely on a global drush.

@mglaman mglaman force-pushed the remove-php-role-soft-dependency branch from 4778b69 to ce3a6e6 Compare April 20, 2017 02:20
@mglaman
Copy link
Contributor Author

mglaman commented Apr 20, 2017

@oxyc fixed. I actually updated it on #37, removing --root

@mglaman mglaman force-pushed the remove-php-role-soft-dependency branch 4 times, most recently from f910e64 to ade84ff Compare April 20, 2017 03:56
@mglaman
Copy link
Contributor Author

mglaman commented Apr 20, 2017

@geerlingguy I've tried, and tried. I don't know why drush si is failing :( But it is on both PRs.

I tried setting sendmail to mailhog, tee mail.out > /dev/null, etc. Nothing. I am assuming it's due to failure to email?

@geerlingguy
Copy link
Owner

@mglaman - That's really weird. I know BLT started seeing this issue in Travis CI builds recently: acquia/blt#1336

It seems like it's related to either using Drupal 8.3.0+, or maybe Drush 8.1.10?

geerlingguy added a commit that referenced this pull request Apr 20, 2017
@mglaman
Copy link
Contributor Author

mglaman commented Apr 20, 2017

@geerlingguy I wonder if installing sendmail to the Docker image? The error is sh: /usr/sbin/sendmail: No such file or directory. But my normal tricks seemed to fail to work, like setting sendmail path to which true

@geerlingguy
Copy link
Owner

@mglaman - Yeah; see my latest commit: 3611e53

Tests are running right now, we'll see if that fixes things: https://travis-ci.org/geerlingguy/ansible-role-drupal/builds/223991723

@geerlingguy
Copy link
Owner

@mglaman - Can you rebase this PR? It seems like the fix worked.

This clears opcache via `drush eval` instead of restarting the webserver
or the php-fpm service.
@mglaman mglaman force-pushed the remove-php-role-soft-dependency branch from ade84ff to 5f42653 Compare April 20, 2017 17:32
@mglaman
Copy link
Contributor Author

mglaman commented Apr 20, 2017

@geerlingguy 👍 rebased

@geerlingguy geerlingguy merged commit 45d1a01 into geerlingguy:master Apr 20, 2017
@mglaman mglaman deleted the remove-php-role-soft-dependency branch April 20, 2017 20:43
geerlingguy added a commit that referenced this pull request Apr 20, 2017
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