Created
April 23, 2010 01:18
-
-
Save kocolosk/376049 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| drop_cache(Db) -> | |
| Cmd = couch_config:get("couchdb", "bin_dir") ++ "/drop_cache " ++ | |
| Db#db.filepath, | |
| Port = erlang:open_port({spawn, Cmd}, [exit_status]), | |
| ?LOG_DEBUG("waiting for drop_cache exit while compacting ~p", [Db#db.name]), | |
| receive | |
| {Port, {exit_status, 0}} -> | |
| ok; | |
| {Port, {exit_status, Status}} -> | |
| ?LOG_ERROR("drop_cache on ~s exited with ~p", [Db#db.filepath, Status]), | |
| ok | |
| end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment