yacc / stripemetrics.com

Collection of metrics for Stripe
0 stars 0 forks source link

Update import director of progress on a regular basis #2

Open yacc opened 11 years ago

yacc commented 11 years ago

Right now, it's only when the import is finished that we update the import director. If the import fails, the @last_processed_ts@ is not going to be updated.

    import.update_attributes(status:'success',time:(start_time-Time.now).to_i,count:imported)
    director.update_attributes(last_ran_at: Time.now, last_processed_ts: newest_import)