Comments (7)
More or less, yes. I was looking for a solution to delay a synapse and the only thing I came up with was to start thread, what would launch a synapse after a given time. The ability to delay without start a synapse is equal to the sleep neuron. I just added it because time.sleep was already needed.
Maybe I missed something and we are already able to start a synapse after a given time?
from delay-neuron.
I you use the sleep neuron in first place (first neuron of the list) it will wait before running the first task, yes.
It's not what you want?
from delay-neuron.
The main purpose for me was, if I go sleep, tell Kalliope to turn everything off except of a lamp in my living room what goes off after an hour. But with the sleep neuron Kalliope is sleeping and cant to do anything at this moment, the synapse delay is running as a thread so Kalliope is still functional.
from delay-neuron.
Oh ok! I see. Nice idea. You should update your doc to explain this then !
Maybe this could be integrated into the sleep neuron. To provide both behavior. This a flag to select one or the other.
from delay-neuron.
Like you see Im not good in explain something especially in English :) I was hopping it would be clear with the synapse example and the comment that it would run as thread. But yes I would update the docs then.
But I also think it would be better a default option for the sleep neuron.
from delay-neuron.
Ok, I looked at the code. you use a subprocess to call a new instance of kallioe with kalliope start --run-synapse
which is not a good idea.
Anyway, I'll keep in mind the idea of the concept and I will see if we can implement it natively in the sleep neuron.
from delay-neuron.
This was my first neuron I wrote and basically I just took the Async shell from the shell neuron and removed the stuff I don´t needed. So no big deal, but it worked the last few months and I thought, why not share.
Now I have some more experience with python and the code of Kalliope whereby I would probably try to use the SynapaseLauncher directly instead of calling the shell. But I think that´s what you mean with "implement it natively"?
Anyway, when I will PR my other neuron I will leave this one out.
from delay-neuron.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delay-neuron.