| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously the code deleted the entry of all of the DocItems of the page
after its contents were requested once, but this caused problems when
the cache was cleared when it expired.
Instead of deleting the entry to check if it should be queued on the
next item request, we keep it and create an entry in the
_item_futures dict for all items again and check for containment there.
To avoid populating the queue multiple times with the same item in some
cases the futures cleanup task will now only run when the queue is empty
|
| | | |\ \ \ \ \ |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
With a normal event, if multiple gets were suspended and a refresh
started, we'd continue the refresh after the first get finished and
set the event which would be the same behaviour as the one it tried
to fix. This is avoided by using a counter that's incremented every time
a context manager is entered around an event and only setting the event
when that counter reaches a zero after everything exited the context mgr
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
To be able to set the attribute at the start of the coro we need to
be able to access the item's future before we know about all the other
items. This also saves us from having to add them all as the queue
parser or get_markdown will create the futures for us dynamically
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
If an inventory refresh was started while the symbol embed coroutine
was suspended, it could cause the parser to try to fetch a non existent
future if the markdown was requested after it was cleared but before
new inventories were loaded in.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
When wrapper uses a global name, which conflicts with a global name
from wrapped's module that wrapped uses for its annotations, we run into
a situation that can't be solved without changing one of the names, so
an error is raised to give this clearer meaning.
The check may be erroneous in some edge cases or the objects the
conflicting names refer to can be functionally identical, so the error
can be turned into a logged warning.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Shortening the renamed symbols string to 100 chars is not accurate
as the footer also contains a string before that, subtracting its length
fixes this.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
A context switch may occur when we're waiting for the web page response,
during which a clear could be triggered. If the event is not set before
that we could end up with the dictionary changing sizes, or if a copy
was made, a future that'd never finish as it'd be
cleared from the queue and the futures dict
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Co-authored-by: MarkKoz <[email protected]>
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The scheduler can't keep track of multiple tasks with the same id,
and rescheduling the update task using the same id within an already
scheduled update task caused the new task to get ignored as the old task
only got deleted from the scheduler after it was finished
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The method no longer runs anything asynchronous
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The decorator works in revers to what the docstring explained
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | |\ \ \ \ \ \ |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Getting the value from a defaultdict will always create the key for it,
creating unnecessary entries every time a symbol is fetched from the bot
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The converter used to set them already ensures this for us, making the
call redundant
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The footer also now says Moved: at the start to clarify the meaning
of the symbols to the user
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
A dictionary allows us to grab the original symbol name and then
get all the renamed symbols from it, with the improvements to
`ensure_unique_symbol_name` we can also use lists instead of sets as
each symbol we add should be unique
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Previously update_single looped this function until there were no
duplicates and when creating new symbols the function had to check
if the symbol to create a new name from started with a group/package
to avoid redundancy.
The new approach ensures a new symbol is always unique when returning
by handling the containment check inside and outputting a symbol name
in the format of package.group.symbol which should always be unique
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Without this the command will fetch the source of the wrapper
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Some constants need to be shared between html and parsing, because they
may also be wanted to be edited by the cog user to change the behaviour,
they were moved into the package's init.
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The 0.6 release brought a new parameter that has to be included in all
tag handling methods
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Without the exception set, to the user the bot would fail silently
if an exception was handled here
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Because the futures are cleaned up and Markdown only exists in the
cache after a short time, items that were requested previously
and had the cache cleared would be missing from the CachedParser
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
This could be handled by using sets to hold the items in _page_symbols,
but ultimately the check has a much smaller cost than having
thousands of sets for the urls.
Because we create futures for every item that ends up in the queue we
can also skip the .get is None check and instead fetch the
future directly from the dict
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The code has no way of reaching futures through new requests after
their result has been set as that also includes setting its value in
redis.
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
In some cases these are actual symbols that we can look up
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The code handling this was moved to a function to achieve this cleanly.
Includes fixes for bugs where incorrect package was added to the symbol
name in the second branch and an incorrect symbol being added in
the third branch
Co-authored-by: MarkKoz <[email protected]>
|
| | | | | | | | | | |
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Co-authored-by: MarkKoz <[email protected]>
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Co-authored-by: MarkKoz <[email protected]>
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
We're not using it as a decorator so using wraps only complicates
the call syntax
|
| | | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Instead of fetching it again in the cog, the converter now returns
the inventory for later use. The set command now no longer attempts
to reschedule the inventory, and a bug that caused the inventory
rescheduling to do nothing in `update_single` was fixed after moving
it to its own method
|