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

Shell robustness #373

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Shell robustness #373

wants to merge 7 commits into from

Conversation

wiktorn
Copy link
Contributor

@wiktorn wiktorn commented Mar 12, 2017

Two small improvements for shell scripts.

If DB_DIR is not a directory, which may happen when dispatcher is not yet
started, refuse to work further as nothing good will come from it.
When auto is set as REPLICATION_ID, try to guess the latest/greatest file that
is present locally.
Instead of generating areas in 3 seconds intervals, check how much time it
took to generate the areas and sleep to reach average `desired_cpu_load`.

If you set it to:
1 - script will sleep 99x more than it works (so average cpu load is 1%)
50 - script will sleep the same time as it works (so average cpu load is 50%)
100 - script will sleep only 3 seconds (hardcoded minimum) giving average cpu
    load 100%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant