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

Only keep one, older inactive job per publication #307

Closed
jpmckinney opened this issue Oct 10, 2023 · 3 comments
Closed

Only keep one, older inactive job per publication #307

jpmckinney opened this issue Oct 10, 2023 · 3 comments
Labels
component: orchestration operations Actions to be performed by administrators in the normal operation of the system

Comments

@jpmckinney
Copy link
Member

jpmckinney commented Oct 10, 2023

I forget if this was in the original requirements, but we don't need to keep more than one, to allow reversion.

Can probably do this after if job_complete:

Ensure the job succeeded (no failed tasks).

@jpmckinney
Copy link
Member Author

Once jobs are deleted:

To check jsonl.gz files created in last 90 days (can change to 30 or whatever) without corresponding CSV files:

find -mtime -90 -name '.jsonl.gz' -not -name '*' | sed s/.jsonl.gz/.csv.tar.gz/ | xargs -I sh -c 'test ! -f "_" && echo _'

And to get only the unique jobs:

find -mtime -90 -name '.jsonl.gz' -not -name '*' | sed s/.jsonl.gz/.csv.tar.gz/ | xargs -I sh -c 'test ! -f "_" && echo _' | grep -Eo '/[0-9]+/' | sort -u

Can then use the output to re-run the flattener job for cases where CSVs are missing.

@jpmckinney jpmckinney added the operations Actions to be performed by administrators in the normal operation of the system label Oct 10, 2023
@jpmckinney
Copy link
Member Author

Soft-blocked by #29 and #30

@jpmckinney
Copy link
Member Author

Superseded by #373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: orchestration operations Actions to be performed by administrators in the normal operation of the system
Projects
None yet
Development

No branches or pull requests

1 participant