-
Notifications
You must be signed in to change notification settings - Fork 42
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
Log requests from the CLI #109
Comments
I'm having some trouble with the |
@schomatis Sorry for only responding now. I'm not sure, but there may be a misunderstanding here. IPFS can call it's commands either directly from the cli, or send it to the daemon via http. Note that this has nothing to do with online or offline mode. Online/Offline mode is a property of your running daemon, and specifies whether or not your ipfs node talks to other ipfs nodes. A daemon in offline mode will still track your requests, since they come in through the http api. When a requests is executed directly through the cli, tracking the requests doesn't make much sense because there is just that one requests that is handled by the process. Also note that IIUC the request log is only kept in memory, and only as long as the daemon is running. Since in the cli case (i.e. when there is no daemon) there is no process in the background that could track requests, all of this would need to be restructured. |
@keks Thanks for the clarification in the terminology.
Yes but @whyrusleeping suggested using the request log as an indication of command termination (even if it is the only one) to avoid shutting down the node prematurely and wait for the command.
This is a good point, I'll have to look deeper into the code. The log request is still created in the CLI case but I haven't found an easy way to check if a request logged in the CLI executor is actually being logged, since the |
Currently requests are only being logged in the online mode by the HTTP handler. It would be useful to extend this mechanism to cover any IPFS use case, which means logging it also in the offline mode in the CLI.
Normally this wouldn't be necessary as the request log is only used as an informative service where there can be more than one request simultaneously (i.e., in the online mode handling many concurrent HTTP request and not in the offline mode with the CLI handling an only request before shutting down) but the rationale is to have a single point of control for any requests (one or many) before shutting down the IPFS core.
The text was updated successfully, but these errors were encountered: