Discovery
domain does not reschedule lazily executed Task
s
#723
Labels
Discovery
domain does not reschedule lazily executed Task
s
#723
Describe the bug
The
Discovery
domain does not reschedule lazily executedTask
s when stopping. The trace for this is as follows:Discovery.start
is called to register handlers ontoTaskManager
before it starts processing.TaskManager.startProcessing
is called to start task processing.Discovery.discoverVertexHandler
is executed lazily.TaskManager.stopProcessing
is called in order to stop task processing.Discovery.discoverVertexHandler
catches anErrorTaskStop
onctx.signal.reason
.Discovery.scheduleDiscoveryForVertex
to reschedule the task.Discovery.scheduleDiscoveryForVertex
callsTaskManager.getTasks
, seeing that the task that is currently executing cleanup already exists.TaskManager.startProcessing
is called, the task to resume discovery is not executed.To Reproduce
As the code to reproduce this only exists within the context of my
Discovery
domain pagination changes, please refer toPolykey/tests/discovery/Discovery.test.ts
Line 494 in 167b041
Expected behavior
The discovery task should be rescheduled so that discovery of vertices can be resumed after restarts.
Screenshots
Platform (please complete the following information)
Additional context
Found whilst working on #716
Notify maintainers
@tegefaulkes
The text was updated successfully, but these errors were encountered: