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

Debug info: print all workers #1200

Open
wants to merge 2 commits into
base: main-ose
Choose a base branch
from

Conversation

ArnyminerZ
Copy link
Member

@ArnyminerZ ArnyminerZ commented Dec 27, 2024

Purpose

Right now we only provide the information of the individual sync workers for each account and data type, but no information about the "generic" workers is provided.

Example:

Sync workers:

┌───────────────────────────────────────┬─────────────────┬─────────────┬─────────┬────────────┬────────────────┐
│ Tags                                  │ State           │ Next run    │ Retries │ Generation │ Periodicity    │
├───────────────────────────────────────┼─────────────────┼─────────────┼─────────┼────────────┼────────────────┤
│ [.sync.account.AccountsCleanupWorker] │ ENQUEUED (-256) │ In 20 hours │ 0       │ 11         │ every 1440 min │
└───────────────────────────────────────┴─────────────────┴─────────────┴─────────┴────────────┴────────────────┘

Short description

  • Added workersInfoTable in DebugInfoModel which allows generating tables for workers in a more generic way.
  • Added information for AccountsCleanupWorker.

Checklist

  • The PR has a proper title, description and label.
  • I have self-reviewed the PR.
  • I have added documentation to complex functions and functions that can be used by other modules.
  • I have added reasonable tests or consciously decided to not add tests.

@ArnyminerZ ArnyminerZ linked an issue Dec 27, 2024 that may be closed by this pull request
@ArnyminerZ
Copy link
Member Author

ArnyminerZ commented Dec 27, 2024

@rfc2822 I've added the info for AccountsCleanupWorker, I don't know if any other one is desirable.

@ArnyminerZ ArnyminerZ self-assigned this Dec 27, 2024
@ArnyminerZ ArnyminerZ requested a review from rfc2822 December 27, 2024 11:46
@ArnyminerZ ArnyminerZ added the enhancement New feature or request label Dec 27, 2024
@ArnyminerZ ArnyminerZ marked this pull request as ready for review December 27, 2024 11:46
Copy link
Member

@rfc2822 rfc2822 left a comment

Choose a reason for hiding this comment

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

Could we have a list of all "other" workers which are not mentioned in the account section? Reason is that there may be old workers which have not been cancelled correctly, for instance by migrations.

Maybe we can return the IDs of the workers when we dump the account workers, remember them and at the end print all other workers (= those which were not printed yet). Or something similar.

Also I think it's time to move the debug info generation into a separate class DebugInfoGenerator, then it won't clutter the model (still UI layer) so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug info: print all workers
2 participants