/imports endpoint doesn’t return running imports
The /imports
endpoint doesn’t return the currently running imports.
For context:
When the dashboard uploads a new file it adds the id
created for this file to a set of watched ids. If there are items in this set a polling mechanism is started that continuously polls the /imports
endpoint in order to update the internal state of the dashboard with the current state of the imports. This happens so the dashboard can display the current phase (importing / normalizing) and progress to users.
If the response to the poll requests doesn’t include the respective file id anymore, it is assumed that the import job for this file has finished and the id is removed from the set.
Reproduction:
- Login to the dashboard
- open the dev console in your browser
- upload a file the media section of the show’s basic data
- monitor the visible state of the upload in the ui and compare it to the output in the network panel and console
The job state in the ui will show Verarbeite (Processing) the entire time. This is the default a more specific state cannot be determined.
If you look at the network panel you should see something like this:
As you can see the imports response doesn’t contain any jobs even though an import job is running right now.
Consequently, the import watcher is stopped almost immediately because from it’s point of view there are no import jobs to monitor.