Skip to content

Commit

Permalink
Merge pull request #53 from CoralineAda/encode-enqueued-at
Browse files Browse the repository at this point in the history
Use epoch seconds to pass enqueued_at value
  • Loading branch information
CoralineAda authored Jun 25, 2024
2 parents 7383967 + 95f985b commit aef6766
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/codebooks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def index
def show
@context = params[:id]
@context_key = @context.gsub("_given","").gsub("_exp","").gsub("klass","class").gsub("_","-")
@enqueued_at = params[:enqueued_at]
@enqueued_at = params[:enqueued_at].present? ? Time.at(params[:enqueued_at].to_i).strftime("%T %Z") : nil

sections = Question::QUESTIONS.keys
@section_name = Question::QUESTIONS[@context.to_sym]
Expand All @@ -40,7 +40,7 @@ def show
def enqueue_categories
context = params[:codebook_id].gsub("_given","").gsub("_exp","").gsub("klass","class").gsub("_","-")
CategoryExtractorJob.perform_async(context)
redirect_to( action: :show, id: params[:codebook_id], params: {enqueued_at: Time.now.strftime("%I:%M:%S %P (%Z)")} )
redirect_to( action: :show, id: params[:codebook_id], params: {enqueued_at: Time.now.strftime("%s")} )
end

end

0 comments on commit aef6766

Please sign in to comment.