| Age | Commit message (Collapse) | Author |
|
This is no longer being used as the `WorkbenchImportWorker` was
refactored and it was decided that we don't want to enable retries for
imports.
For example, imagine you have an hour-long import that fails after 50
minutes. We retry three times and now we've wasted 2.5 hours of your
time just to tell you that the import failed.
Thus the decision was to remove it.
|
|
Retry removed (but not the deadcode yet) [amend me]
|
|
Debugging Java Integration (ZipService -> HTTPService -> Object Creation)
- Created an ErrorFormat concern to see what went wrong in the HTTP call
as so many things can go wrong due to:
* Timeout Issues
* Illegal database setup or cleaning before tests
|
|
- Replzed Lazy Enum over get_next_entry and group by with explicit looping and yielding to an instance level enumerator
that yields streams per subdir (wich represents a referential).
- Fixtures and Specs that use a REAL usecase.
Next: Get rid of metadata kludge (should fix failing specs)
|
|
|
|
|
|
Instead of manually defining the finished statuses, use the method
that's already defined on `Import` to get them.
The only unfortunate part is that we now had to muss up our `Import`
code and convert those methods to class methods in order for them to be
accessible to `ParentImportNotifier` as well as its instance methods.
Refs #3511
|
|
This call can be written much more concisely. Thanks for the suggestion
Robert!
Refs #3511
|
|
Robert pointed out that it isn't necessary to prefix the method call
with `self.`. Makes the code cleaner.
Refs #3511
|
|
merge to keep a reference in feature branch)
|
|
A new service, `ParentImportNotifier`, will be called by a Cron job
every 5 minutes. This service will query all finished sub-imports that
haven't yet notified their parent, and tell them to do so.
factories/workbench_imports.rb:
Add a `WorkbenchImport` factory. This is currently incomplete. We'll
want to correctly initialise the `file` attribute eventually.
import.rb:
factories/imports.rb:
In order to get the test setup to work correctly, we skip the
`before_create` callback on `Import`. This is because that callback
initialises `status` to "new". We want to be able to set any status
value in our tests to test things properly. Thus the callback messes
with our buttermilk. For all imports created by the factory, skip this
callback. In order to skip the callback, I had to put it in its own
method and pass the method name to `#skip_callback`. That's why the
callback is now in a new method in `Import`.
Adds an empty `#notify_parent` method in `Import`. For now this doesn't
do anything, but eventually it will be filled in to perform the actual
notification. I this changeset, all we're doing is setting up the
connecting logic to notify the right things from the Cron job.
import_spec.rb:
Remove the `.class_name` validation because we removed that previously
in `Import`. The `belongs_to` is now a polymorphic association, with no
class name specified.
parent_import_notifier_spec.rb:
Needed to use `create` instead of `build_stubbed` in a lot of these
cases so that I could validate the query. Really don't like this because
now this set of tests is SUPER SLOW. If you have any ideas for how to
speed it up, let's do that.
Refs #3511
|
|
- Added tests for HTTPService (regression)
- Removed some dead code (Workbench model spec, Import factory)
- Changed front_end_host to rails_host in config
|
|
|
|
|
|
|
|
logging)
|
|
|
|
- speced but missing error treatment
|
|
|