简体   繁体   English

从 opencpu 会话中删除对象

[英]Delete object from opencpu session

How do I delete a previously created object in OpenCPU?如何删除以前在 OpenCPU 中创建的对象?

I need to delete some unused objects.我需要删除一些未使用的对象。 For example, the result of a POST is the following:例如,POST 的结果如下:

/ocpu/tmp/x0b0f8555a1e1d6/R/.val
/ocpu/tmp/x0b0f8555a1e1d6/stdout
/ocpu/tmp/x0b0f8555a1e1d6/source
/ocpu/tmp/x0b0f8555a1e1d6/console
/ocpu/tmp/x0b0f8555a1e1d6/info
/ocpu/tmp/x0b0f8555a1e1d6/files/DESCRIPTION

How do I delete the object x0b0f8555a1e1d6?如何删除对象 x0b0f8555a1e1d6?

I tried posting to我尝试发布到

curl http://myserver:myport/ocpu/library/base/R/rm -d "x0b0f8555a1e1d6"

which gives an error:这给出了一个错误:

... must contain names or character strings

In call:
rm(x0b0f8555a1e1d6 = NA)

And

curl http://myserver:myport/ocpu/library/base/R/rm -d "list='x0b0f8555a1e1d6'"

gives a warning that the object was not found:给出未找到对象的警告:

object 'x0b0f8555a1e1d6' not found

The temporary objects automatically get deleted after a while (usually 24h).一段时间后(通常是 24 小时),临时对象会自动被删除。 There is no http API to manually prune them.没有 http API 可以手动修剪它们。 Have a look at the /etc/cron.d/opencpu script on your server.查看服务器上的/etc/cron.d/opencpu脚本。

If you really want to delete a session you can manually delete the directory in /tmp/ocpu-store/ on your server.如果您真的想删除会话,您可以手动删除服务器上/tmp/ocpu-store/的目录。 It also gets automatically deleted on reboot.它也会在重新启动时自动删除。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM