creation for course creator access
When a course creator creates a new library, the cached JWT token for
Meilisearch needs to be refreshed to include the new library's access_id.
Without this, newly added components won't appear in search results until
the page is refreshed.
This works in conjunction with the backend fix that creates SearchAccess
records immediately on library creation.
The fix invalidates the content_search query, triggering React Query to
refetch the token with updated access permissions.
When uploading a library archive file during the creation of a new
library, the code prior to this commit did not properly handle the "In
Progress" state, which is when the celery task doing the archive
processing is actively running. Note that this is distinct from the
"Pending" state, which is when the task is waiting in the queue to be
run (which in practice should almost never happen unless there is an
operational issue).
Since celery tasks run in-process during local development, the task
was always finished by the time that the browser made a call to check
on the status. The problem only happened on slower sandboxes, where
processing truly runs asynchronously and might take a few seconds.
Because this case wasn't handled, the frontend would never poll for
updates either, so the upload was basically lost as far as the user
was concerned.