pulibrary / cicognara-rails

Rails app for managing metadata for the Digital Cicogara Library https://cicognara.org
Other
1 stars 2 forks source link

Why doesn't the cap deploy task also regenerate partials? #427

Open hackartisan opened 4 years ago

hackartisan commented 4 years ago

The readme instructs us to run cap [STAGE] deploy:reindex after deploying. This task updates the marc files and indexes them. Why don't we run partial generation at this time, also? When is partial generation done / when should it be done?

tampakis commented 4 years ago

I think it does here: https://github.com/pulibrary/cicognara-rails/blob/master/config/deploy.rb#L47-L48

escowles commented 4 years ago

I see rake tei:index in that Cap task, but not rake tei:partials — I'm not sure why that isn't there, and think it probably should be.

hackartisan commented 4 years ago

@tampakis the task I'm asking about which I don't see being run is called tei:partials

tampakis commented 4 years ago

ahh ok, I think maybe there's an expectation that the TEI doesn't change often and that therefore the partials are relatively stable

cwulfman commented 4 years ago

so this?

namespace :deploy do
  desc 'Generate partials, reindex the TEI entries and MARC records'
  task :build-tei do
    on roles(:web), in: :groups, limit: 3, wait: 5 do
      within release_path do
        execute :rake, 'tei:catalogo:update'
        execute :rake 'tei:partials'
      end
    end
 task :reindex do
    on roles(:web), in: :groups, limit: 3, wait: 5 do
      within release_path do
        execute :rake, 'tei:index'
      end
    end
  end
escowles commented 4 years ago

👍 I think that's the right change.

I agree that maybe the TEI doesn't change that much — but when we do a new deploy, we probably need to generate them all again regardless.