Work around problem with broken workspace files. #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A user had several workspace files that had bad state shock = 1 but shocknode had no node id. This results in an enumeration of all visible shock nodes followed by a crash due to unexpected format of the returned data. This PR works around the problem.
Bad workspace obj: bogus shock node $VAR1 = {
'owner' => 'gwillsey@patricbrc.org',
'shocknode' => 'https://p3.theseed.org/services/shock_api/node/',
'_id' => bless( {
'value' => '570dacc0fc65212743549e0a'
}, 'MongoDB::OID' ),
'name' => 'MERO_75_R1.fq.gz',
'shock' => 1,
'path' => '',
'autometadata' => {},
'uuid' => '2FAAC09A-011E-11E6-81D4-2FC1682E0674',
'size' => 0,
'folder' => 0,
'wsobj' => {
'owner' => 'gwillsey@patricbrc.org',
'global_permission' => 'n',
'creation_date' => '2016-03-21T17:35:49',
'permissions' => {},
'_id' => bless( {
'value' => '56f030f5fc65211d38481f2c'
}, 'MongoDB::OID' ),
'name' => 'home',
'metadata' => {},
'uuid' => '5A26A1EE-EF8B-11E5-A5FE-24B7682E0674'
},
'creation_date' => '2016-04-13T02:19:44',
'type' => 'reads',
'metadata' => {},
'workspace_uuid' => '5A26A1EE-EF8B-11E5-A5FE-24B7682E0674'
};