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

fix: no need to forget the asyncResult! #79

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: no need to forget the asyncResult!
when we're not assining forget, it wouldn't save the result to any backend resources.
amindadgar committed Jun 27, 2024

Verified

This commit was signed with the committer’s verified signature.
amindadgar Mohammad Amin Dadgar
commit 79f00a3868ba6d9226de5d4245bad70f76aea15a
4 changes: 1 addition & 3 deletions worker.py
Original file line number Diff line number Diff line change
@@ -32,13 +32,11 @@ def query_llm(recieved_data: dict[str, Any]):

community_id = fetch_community_id_by_guild_id(guild_id=recieved_input.guild_id)
logging.info(f"COMMUNITY_ID: {community_id} | Sending job to Celery!")
result = ask_question_auto_search.delay(
ask_question_auto_search.delay(
question=user_input,
community_id=community_id,
bot_given_info=recieved_data,
)
# releasing memory (maybe?)
result.forget()


@backoff.on_exception(