2023-01-13
Mongodb 如何实现 sleep功能?
Mongodb 如何实现 sleep功能?
SQL Server: waitfor delay '00:00:10'
Mongodb :???
我来答
添加附件
收藏
问题补充
4条回答
默认
最新
回答交流
提交
问题信息
请登录之后查看
邀请回答
暂无人订阅该标签,敬请期待~~
墨值悬赏
Mongodb 如何实现 sleep功能?
SQL Server: waitfor delay '00:00:10'
Mongodb :???
sleep
Forces the database to block all operations. This is an internal command for testing purposes.
The sleep command takes the following prototype form:
{ sleep: 1, w: <true|false>, secs: <seconds> }
The sleep command has the following fields:
| Field | Type | Description |
|---|---|---|
| w | boolean | If true, obtains a global write lock. Otherwise obtains a read lock. |
| secs | integer | The number of seconds to sleep. |
评论
有用 5
{ sleep: 1, w: <true|false>, secs: <seconds> }
评论
有用 6{ sleep: 1, w: <true|false>, secs: <seconds> }
评论
有用 2
墨值悬赏