Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change how modulus is computed #6

Open
ahouseholder opened this issue Jan 28, 2022 · 0 comments
Open

Change how modulus is computed #6

ahouseholder opened this issue Jan 28, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@ahouseholder
Copy link
Contributor

mods = _df["id"].apply(lambda x: x % divisor)

This line uses the repo id and a modulus to decide how to split repos across parallel runs of the script. The problem is that sometimes individual runs can fail repeatedly, meaning that the same block of repos never gets worked on.

We can't just randomize it, because then we will have more than one process handling a repo.

So I'm thinking we need to add in some other factor that is constant for an individual run, but changes between runs.
Could be hour of the day, or maybe there's some run ID that can be converted to an int? The former can come from within the Python code directly, whereas the latter might require modification to the workflow scripts, unless there is some environment variable already there for the python code to use.

@ahouseholder ahouseholder added the enhancement New feature or request label Jan 28, 2022
@ahouseholder ahouseholder self-assigned this Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant