Skip to content

Commit

Permalink
Inline with origin/master
Browse files Browse the repository at this point in the history
  • Loading branch information
dssecret committed Nov 15, 2023
1 parent cb69355 commit 05e5a83
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions estimate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,9 @@ def estimate_user(user_tid: int, api_key: str) -> typing.Tuple[int, int]:

try:
update_user(tid=user_tid, key=api_key, refresh_existing=True)
update_error = False
except Exception:
update_error = True
finally:
update_error = False

ps = PersonalStatModel.objects(tid=user_tid).order_by("-timestamp").first()

Expand All @@ -79,4 +78,4 @@ def estimate_user(user_tid: int, api_key: str) -> typing.Tuple[int, int]:
df["tid"][0] = user_tid
df = df.astype("int64")

return model.predict("int64"), int(time.time()) - ps.timestamp + 604_800
return model.predict(df), int(time.time()) - ps.timestamp + 604_800

0 comments on commit 05e5a83

Please sign in to comment.