Skip to content

Commit

Permalink
eliminate errors for missing location data, illogical hierarchies, an…
Browse files Browse the repository at this point in the history
…d unexpected creator types
  • Loading branch information
quoideneuf committed Sep 20, 2013
1 parent 84cd500 commit 3bb6ee0
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ A typical migration can take several hours and will cause ArchivesSpace's
indexer to get backed up. Migrated records may not appear right away in browse or search results in ArchivesSpace. Consider running ArchivesSpace with the indexer
turned off to speed up the migration process.

A large migration may fail because of an expiration of the migration tool's session in ArchivesSpace. Avoid this by setting a 10 hour session expiration threshold in the ArchivesSpace configuration file:

AppConfig[:session_expire_after_seconds] = 36000

Do not run a migration process against an ArchivesSpace instance that already
contains data.

Expand All @@ -62,3 +66,4 @@ pages of Archon data that are cached. For example, if your largest Archon collec
Appdata.archon_page_cache_size 500

There's no (or little) advantage to setting the cache size to a value larger than the number of Content records in the largest Collection, divided by 100.

6 changes: 4 additions & 2 deletions app/lib/archon_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ def self.unfound(id = '0')
:warn
end

$log.send(loglevel, "Couldn't find a #{@type} with the ID: #{id}")
unless id == '0'
$log.send(loglevel, "Couldn't find a #{@type} with the ID: #{id}")
end

nil
end

Expand All @@ -201,7 +204,6 @@ def self.find(id)
end

if @@cache[import_id]
$log.debug("Found cached record: #{@@cache[import_id].inspect}")
return @@cache[import_id]
else

Expand Down
4 changes: 3 additions & 1 deletion app/models/archon_creator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def self.transform(rec)
}))
else
$log.warn("Couldn't create an agent record from: #{rec.inspect}")
return nil
end

if rec['Dates']
Expand Down Expand Up @@ -136,7 +137,8 @@ def self.create_relationship(relator_object_type, rel)
:relator => 'is_parent_of'
})
else
raise "unable to related these records"
$log.warn("Unable to create a parent-child relationship for Creator #{archon_id} - this creator is not a person.")
nil
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/archon_mixins.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def transform_location(loc)
end

#fallback
unless obj.coordinate_1_indicator
unless obj.coordinate_1_indicator && !obj.coordinate_1_indicator.empty?
obj.coordinate_1_indicator = "not recorded"
obj.coordinate_1_label = "RangeValue"
end
Expand Down

0 comments on commit 3bb6ee0

Please sign in to comment.