Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Distribution related functions #153

Merged
merged 6 commits into from
Jun 26, 2024
Merged

Conversation

MrGuzior
Copy link
Contributor

@MrGuzior MrGuzior commented Jun 25, 2024

Part of the bnlo / gotamedia print card. This also makes it possible to have many print titles, compared to the 6 we have now.
Up until now every title delivered every day. Now we need to adjust to for example vetlandaposten that distributs tuesdays, thursdays and saturdays. This has been in greenfield but since it will be needed for more titles we lift it over to common.

deliveryDaysToNumberOfJobs function calculates how many times a day the tot sequence is supposed to run to get the latest data.

numberOfJobsToJobOffsets function calculates when the sequence was run for a given day.

getDeliveryDays function returns days when the paper gets delivered. The data lives in a common config.

Checklist

  • Was the code tested in lab?
  • Have you reviewed the code yourself?
  • Are the configs updated?
  • Does the readme need an update?

Write the description and the reason for this PR below ↓

@MrGuzior MrGuzior requested a review from a team as a code owner June 25, 2024 11:40
varney
varney previously approved these changes Jun 25, 2024
Copy link
Contributor

@varney varney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Impressive! Looks like it should work, and nice and easy to tune if needed once testing starts with TOT sequences. 🥇

"thursday",
"friday",
"saturday",
"sunday",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A little bit out of scope, but when you're done with all this for Local/Gota, we'll be able to change Expressen's deliveryDays to remove sunday so that it matches the current reality 🎉

test/unit/titles-get-delivery-days-test.js Outdated Show resolved Hide resolved
@ebbalindstrom ebbalindstrom merged commit 26bd7d8 into master Jun 26, 2024
3 checks passed
@ebbalindstrom ebbalindstrom deleted the feature/delivery-config branch June 26, 2024 06:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants