|
@@ -172,22 +172,25 @@ class LIFOBuffer(object):
|
|
|
|
|
|
|
|
|
cls.api_response.status = "complete"
|
|
|
- if instantiated_neuron.is_waiting_for_answer:
|
|
|
- logger.debug("[LIFOBuffer] Wait for answer mode")
|
|
|
- cls.api_response.status = "waiting_for_answer"
|
|
|
- raise Serialize
|
|
|
+ if instantiated_neuron is not None:
|
|
|
+ if instantiated_neuron.is_waiting_for_answer:
|
|
|
+ logger.debug("[LIFOBuffer] Wait for answer mode")
|
|
|
+ cls.api_response.status = "waiting_for_answer"
|
|
|
+ raise Serialize
|
|
|
+ else:
|
|
|
+ logger.debug("[LIFOBuffer] complete mode")
|
|
|
+
|
|
|
+
|
|
|
+ matched_synapse.neuron_module_list.append(instantiated_neuron)
|
|
|
+
|
|
|
+ matched_synapse.neuron_fifo_list.remove(neuron)
|
|
|
+
|
|
|
+ if instantiated_neuron.pending_synapse:
|
|
|
+ logger.debug("[LIFOBuffer] Last executed neuron want to run a synapse. Restart the LIFO")
|
|
|
+
|
|
|
+ cls.add_synapse_list_to_lifo([instantiated_neuron.pending_synapse])
|
|
|
+
|
|
|
+
|
|
|
+ raise SynapseListAddedToLIFO
|
|
|
else:
|
|
|
- logger.debug("[LIFOBuffer] complete mode")
|
|
|
-
|
|
|
-
|
|
|
- matched_synapse.neuron_module_list.append(instantiated_neuron)
|
|
|
-
|
|
|
- matched_synapse.neuron_fifo_list.remove(neuron)
|
|
|
-
|
|
|
- if instantiated_neuron.pending_synapse:
|
|
|
- logger.debug("[LIFOBuffer] Last executed neuron want to run a synapse. Restart the LIFO")
|
|
|
-
|
|
|
- cls.add_synapse_list_to_lifo([instantiated_neuron.pending_synapse])
|
|
|
-
|
|
|
-
|
|
|
- raise SynapseListAddedToLIFO
|
|
|
+ raise Serialize
|