-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maybe more clear with a new issue id,about why ao.send keep silence under Cron mode of spawned sub-process #228
Comments
Hi Tom @twilson63 MY HERO,we need your help! |
haha, I have some time to look at it, |
IDK, if this works for you, but this is how I got a spawned process to work with cron function createProcess()
Spawn(ao.env.Module.Id, { Authority = ao.authorities[1],
Tags = {
["Cron-Tag-Action"] = "Cron",
["Cron-Interval"] = "1-minute"
}
})
end
function setOwner(pid)
Send({ Target = pid, Action = "Eval", Data = string.format([[
Owner = "%s"
]], Owner)})
print("Set Owner: " .. pid)
end setOwner(createProcess().receive().Process) Then connect with aos to the aos BI7Wtyy-W3VKBPM2It2VpmI2gntER_tTRGRpVA5NJxg aos> .monitor |
Cron will run, when the process receives messages, but without a monitor, cron will not push outbox to other processes. To monitor, as the Owner of a process you have to submit a signed dataItem to the MU requesting to init the monitoring for cron messages. |
I'll try it,what’s more exciting is I saw you again |
I noticed that you used the command of modifying the Owner, and I'm not sure if this can expose possible problems, so I submitted this test file so that you can quickly and accurately find out if the problem exists. the ao.send in Cron doesn't work for unknown reason May you try the test.zip ? |
It will not push from cron, unless you are monitoring the cron.
```
aos> .monitor
```
Make sure you are doing that, if you are give me the process id, and we
will check the MU can make sure there is a monitoring process running
…On Wed, Oct 2, 2024 at 12:35 PM farmer ***@***.***> wrote:
I noticed that you used the command of modifying the Owner, and I'm not
sure if this can expose possible problems, so I submitted this test file so
that you can quickly and accurately find out if the problem exists.
test.zip <https://github.com/user-attachments/files/16982685/test.zip>
the ao.send in Cron doesn't work for unknown reason
May you try the test.zip ?
—
Reply to this email directly, view it on GitHub
<#228 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAFGLGFTKAKSLXRDKS5WI3ZZQOFNAVCNFSM6AAAAABOOXJMAOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBZGEYTIOJSGM>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The spawned process is the best solution to realize NPCs concept,if each NPC runs with a monitor console window,maybe too heavy,terrible? |
WellThere are a couple of approaches that may help you achieve your objectives 1. Manager process delegated cron. Add the cron to the manger process and monitor. Then when it receives a cron, it looks at the child processes it has spawned and triggers a cron 2. Build a simple cron Oracle service. This is a simple server that is polling the Arweave network every minute for any messages sent to its wallet as a target. Then when the manager spawns a process it sends a message to the Oracle service and then the Oracle service uses ao connect to monitor spawned process ThxTomSent from my iPhoneOn Oct 2, 2024, at 10:28 PM, farmer ***@***.***> wrote:
The spawned process is the best solution to realize NPCs concept,if each NPC run with a monitor console windows,maybe too heavy,terrible?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
In this situation, can I use |
--watch does not push your cron messages, in order to push cron messages you need to monitor them. This means you need to tell a You could potentially use 0rbit or simple server that looks for cron requests and sends monitor requests to a MU. https://hackmd.io/P4bCcgsmTpKpuN-nSE54ng#POST-monitorprocess-id But, I would consider having a master cron process that you monitor then that cron process basically receives a cron message, and then sends a cron message with assignments to all the spawned processes. Basically create a cron service on AO |
the ao.send in Cron action of sub-process works by explicit call but not works by implicit call, maybe a bug?
The text was updated successfully, but these errors were encountered: