https://github.com/ckan/ofs-hero
Rescue corrupted persisted_state.json in ofs-based filestore
https://github.com/ckan/ofs-hero
Last synced: 9 months ago
JSON representation
Rescue corrupted persisted_state.json in ofs-based filestore
- Host: GitHub
- URL: https://github.com/ckan/ofs-hero
- Owner: ckan
- Created: 2014-02-05T09:23:24.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-29T12:37:57.000Z (almost 12 years ago)
- Last Synced: 2025-04-04T17:51:43.603Z (9 months ago)
- Language: Python
- Size: 137 KB
- Stars: 3
- Watchers: 8
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ofs-hero
Rescues broken filestores because ofs is not thread-safe. This script generates
the minimal JSON that's required for the filestore to work. Pull requests
welcome to make it more closer to the original JSON.
## Instructions
After activating your virtualenv, `cd` to the `src` directory, install the
sources via pip::
$ (default) pip install -e git+git://github.com/ckan/ofs-hero.git#egg=ofs_hero
## Usage
Switch to the `ofs-hero` directory and run the paster command with the path to
the config file::
$ (default) paster regenerate -c /etc/ckan/default/production.ini
This will print the JSON value. Pipe it to a file and replace the
`persisted_state.json` file in the flestore::
$ (default) paster regenerate -c /etc/ckan/default/production.ini > persisted_state.json
It is recommended that you shutdown the webserver before replacing the file.