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

Fix run seeds when offline #1320

Merged
merged 9 commits into from
May 20, 2015
Merged

Fix run seeds when offline #1320

merged 9 commits into from
May 20, 2015

Conversation

eugenk
Copy link
Member

@eugenk eugenk commented Apr 12, 2015

Seeds depended on an internet connection. With this change they don't:

  • Proof statuses and categories have fixtures. They are only used if the download from ontohub.org failed.
  • Oops is skipped if either a SocketError (no connection at all) or a RestClient error (e.g. 404 or similar) occurs.

In both cases a message with the error is printed to stdout.

@eugenk
Copy link
Member Author

eugenk commented Apr 14, 2015

As requested in the meeting yesterday, I changed the default behaviour to use the local fixtures only. By setting an environment variable (DOWNLOAD_FIXTURES), we can choose to use online files from ontohub.org instead. The rebuild script sets this environment variable if the -d option is supplied.

Also, -i makes the rebuild script only restart invoker and not clean the state.

@0robustus1
Copy link
Contributor

I'd prefer -r (for restart) instead of -i (for invoker, i assume?).

@eugenk
Copy link
Member Author

eugenk commented Apr 14, 2015

Renamed with 51bed36

@@ -1,18 +1,32 @@
def handle_error(e, reason)
puts <<MSG
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use the <<-MSG way and indent the closing MSG correctly.

@eugenk eugenk force-pushed the fix-run_seeds_when_offline branch from 173c392 to 784fc1b Compare April 20, 2015 08:11
@eugenk eugenk force-pushed the fix-run_seeds_when_offline branch from 784fc1b to f0fb90c Compare May 5, 2015 10:16
@eugenk eugenk force-pushed the fix-run_seeds_when_offline branch from f0fb90c to 37cc69f Compare May 19, 2015 12:56
@0robustus1
Copy link
Contributor

👍

eugenk added a commit that referenced this pull request May 20, 2015
@eugenk eugenk merged commit c7b98d2 into staging May 20, 2015
@eugenk eugenk deleted the fix-run_seeds_when_offline branch May 20, 2015 08:07
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.

None yet

3 participants