Skip to content

Commit

Permalink
fix bugs related to newly-created feeds
Browse files Browse the repository at this point in the history
  • Loading branch information
tejing1 committed Dec 6, 2024
1 parent 198a45e commit 5a36973
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion homeModules/sfeed/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ let
# Temporarily set pipefail
local restore_opts="$(shopt -po pipefail)";set -o pipefail
if sort -k1,1n "$file" | awk -F'\t' -v recentdiv="$1" -v recentmin="$2" -v regressiondiv="$3" -v regressionmin="$4" -v maxdelay="$5" -v firststeplength="$6" -v weightdoublingtime="$7" -v backofffactor="$8" -v deferprobablility="$9" -v lastchecked="$lastchecked" -v lastfailed="$lastfailed" -f ${./regressions.awk}; then
if [ -e "$file" ] && sort -k1,1n "$file" | awk -F'\t' -v recentdiv="$1" -v recentmin="$2" -v regressiondiv="$3" -v regressionmin="$4" -v maxdelay="$5" -v firststeplength="$6" -v weightdoublingtime="$7" -v backofffactor="$8" -v deferprobablility="$9" -v lastchecked="$lastchecked" -v lastfailed="$lastfailed" -f ${./regressions.awk}; then
# Restore pipefail setting
eval "$restore_opts"
else
Expand Down
2 changes: 1 addition & 1 deletion homeModules/sfeed/regressions.awk
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function recip_slope() {
drt = irt - prt;
ef = exp_no_warn(drt);
divisor = r*((1 - ef)*(sxy + sy) + (ef*irt - prt)*sy);
if (divisor == 0) return strtonum("+inf");
if (divisor == 0) return awk::strtonum("+inf");
return (ef*(ef - drt^2 - 2) + 1)/divisor;
}

Expand Down

0 comments on commit 5a36973

Please sign in to comment.