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

Queue based logging #8

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Queue based logging #8

wants to merge 3 commits into from

Conversation

ky28059
Copy link
Member

@ky28059 ky28059 commented Dec 30, 2022

Implements generating a new logfile per run, and also fixes logging to the same file from multiple processes by using QueueHandler for all non-console logs in each process and running a separate logging process that writes the queued logs to file (and eventually to the DS websocket as well). The implementation is not as clean as before though, and it may be worth thinking about how all these different queues should be passed around.

image

@ky28059 ky28059 requested a review from e3l December 30, 2022 00:03
@ky28059
Copy link
Member Author

ky28059 commented Dec 30, 2022

I think having CameraSources construct the pipelines is definitely cleaner currently, it just might get a bit tricky when streaming requires a different port per pipeline per camera source.

@e3l
Copy link
Contributor

e3l commented Dec 30, 2022

hm yes, that is a very good point. Perhaps our options are

  1. to keep the old scheme and have each source to pass all the queues when calling process, or
  2. in each camera source's pipelines arg, pass either a Pipeline class (as it is rn) or a (Pipeline class, port#) tuple

@e3l
Copy link
Contributor

e3l commented Dec 30, 2022

Alternatively, maybe a central streaming coordinator class can have a register function which handles the port assignment, and we pass an instance to every source, to be passed to every pipeline?

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