Neuroglancer tasks
This includes a set of tasks that are run as background processes. This is done so the user doesn’t have to wait when clicking an action. The background processes are controlled by the supervisord system controller.
Background tasks must be in a file named: tasks.py
Don’t move it to another file!
They also cannot accept objects as arguments.
Note: If you modify the tasks.py file, you must restart supervisord on the web server!!!
sudo systemctl restart supervisord.service
- neuroglancer.tasks.nobackground_archive_and_insert_annotations(layeri, url_id)
Same as the background_archive_and_insert_annotations method except it does not use supervisord and does not go into a background process. This will take a while to run for the user.
- Parameters
layeri – the active layer in Neuroglancer we are working on
url_id – the primary key of the Neuroglancer state
- neuroglancer.tasks.restore_annotations(archiveSet)
Restore a set of annotations associated with an archive.
Get requested archive (set of points in the annotations_points_archive table)
Mark session inactive that is in the archive
Create a new active session and add it to either marked_cell, polygon_sequence or structureCOM
- Parameters
archive – ArchiveSet object we want to restore