-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reimplement caching to use a per-year scope
- Add forgiveness if a year fails, continue to the next one - add continue feature - Let the continue process run every 2 hourse, not every 30 min - Add continue support to docker image mirror.sh - off by default
- Loading branch information
1 parent
7d4264d
commit 557e324
Showing
8 changed files
with
256 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0 */2 * * * /continue.sh 2>&1 | tee -a /var/log/docker_out.log | tee -a /var/log/cron_continue.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
if [ -z "${CONTINUE}" ]; then | ||
# continue disabled, do not retry failed years | ||
exit 0 | ||
fi | ||
|
||
echo "Continuing feature detected - ensuring all years mirrored..." | ||
|
||
DELAY_ARG="" | ||
if [ -z $NVD_API_KEY ]; then | ||
DELAY_ARG="--delay=10000" | ||
else | ||
echo "Using NVD API KEY: ${NVD_API_KEY:0:5}****" | ||
fi | ||
|
||
if [ -n "${DELAY}" ]; then | ||
echo "Overriding delay with ${DELAY}ms" | ||
DELAY_ARG="--delay=$DELAY" | ||
fi | ||
|
||
MAX_RETRY_ARG="" | ||
if [ -n "${MAX_RETRY}" ]; then | ||
echo "Using max retry attempts: $MAX_RETRY" | ||
MAX_RETRY_ARG="--maxRetry=$MAX_RETRY" | ||
fi | ||
|
||
MAX_RECORDS_PER_PAGE_ARG="" | ||
if [ -n "${MAX_RECORDS_PER_PAGE}" ]; then | ||
echo "Using max records per page: $MAX_RECORDS_PER_PAGE" | ||
MAX_RECORDS_PER_PAGE_ARG="--recordsPerPage=$MAX_RECORDS_PER_PAGE" | ||
fi | ||
|
||
exec java $JAVA_OPT -jar /usr/local/bin/vulnz cve $DELAY_ARG $DEBUG_ARG $MAX_RETRY_ARG $MAX_RECORDS_PER_PAGE_ARG --continue --cache --directory /usr/local/apache2/htdocs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.