Skip to content

Include job count in WorkerStatus and load_fnc - #1046

Merged
keepingitneil merged 8 commits into
mainfrom
neil/jc
Nov 14, 2024
Merged

keepingitneil merged 8 commits into
mainfrom
neil/jc

Conversation

@keepingitneil

Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot

changeset-bot Bot commented Nov 5, 2024 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 18225e8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-agents Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@keepingitneil
keepingitneil requested a review from a team November 5, 2024 21:19
@theomonnom

theomonnom commented Nov 10, 2024 •

Copy link
Copy Markdown
Member

I think we should pass the Worker instance to the load_fnc, not just the number of jobs bc it seems very specific

@theomonnom

Copy link
Copy Markdown
Member

Bump on this one :)

@keepingitneil

Copy link
Copy Markdown
Contributor Author

ahh missed this, ok yeah that makes sense - will update

Comment thread livekit-agents/livekit/agents/worker.py Outdated
Comment thread livekit-agents/livekit/agents/worker.py Outdated
signature = inspect.signature(self._opts.load_fnc)
parameters = list(signature.parameters.values())
if len(parameters) == 0:
return self._opts.load_fnc() # type: ignore

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about the type: ignore here
What are they used for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

type:ignore is needed because it's not known which load_fnc we have, one with arg or one without?

Comment thread livekit-agents/livekit/agents/ipc/proc_pool.py Outdated

@theomonnom theomonnom left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+ changesets otherwise lgtm

Comment thread livekit-agents/livekit/agents/ipc/proc_pool.py Outdated
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.

2 participants