Skip to content

Commit

Permalink
Merge branch 'adjust-logging'
Browse files Browse the repository at this point in the history
  • Loading branch information
svevang committed Aug 16, 2023
2 parents e305aaf + f8d5bb7 commit 4a572b0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app/jobs/publish_feed_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def null_publishing_item?(podcast, pub_item)
null_pub_item = pub_item.nil? || current_pub_item.nil?

if null_pub_item
Rails.logger.error("Null publishing_queue_item in PublishFeedJob", {
Rails.logger.info("Null publishing_queue_item in PublishFeedJob", {
podcast_id: podcast.id,
incoming_publishing_item_id: pub_item&.id,
current_publishing_item_id: current_pub_item&.id
Expand All @@ -105,7 +105,7 @@ def mismatched_publishing_item?(podcast, pub_item)
mismatch = pub_item != current_pub_item

if mismatch
Rails.logger.error("Mismatched publishing_queue_item in PublishFeedJob", {
Rails.logger.info("Mismatched publishing_queue_item in PublishFeedJob", {
podcast_id: podcast.id,
incoming_publishing_item_id: pub_item&.id,
current_publishing_item_id: current_pub_item&.id
Expand Down
2 changes: 1 addition & 1 deletion app/models/apple/episode.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Episode
AUDIO_ASSET_FAILURE = "FAILURE"
AUDIO_ASSET_SUCCESS = "SUCCESS"

EPISODE_ASSET_WAIT_TIMEOUT = 8.minutes.freeze
EPISODE_ASSET_WAIT_TIMEOUT = 10.minutes.freeze
EPISODE_ASSET_WAIT_INTERVAL = 10.seconds.freeze

# In the case where the episodes state is not yet ready to publish, but the
Expand Down
2 changes: 1 addition & 1 deletion app/models/apple/show.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def create_show!
end

def update_show!(sync)
Rails.logger.warn("Skipping update for existing show!")
Rails.logger.info("Skipping update for existing show!")
# TODO, map out the cases where we'd actually need to update a show
# data = show_data(update_attributes, id: apple_id)
# Rails.logger.info("Updating show", show_data: data)
Expand Down
5 changes: 3 additions & 2 deletions app/models/publishing_queue_item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ def self.delivery_status
end

def self.ensure_queued!(podcast)
Rails.logger.info("Creating new PublishingQueueItem", {podcast_id: podcast.id})
create!(podcast: podcast)
pqi = create!(podcast: podcast)
Rails.logger.info("Created new PublishingQueueItem", {podcast_id: podcast.id, publishing_queue_item_id: pqi.id})
pqi
end

def self.settled_work?(podcast)
Expand Down

0 comments on commit 4a572b0

Please sign in to comment.