Skip to content
代码片段 群组 项目
提交 dc42ba8b 编辑于 作者: Andrea Scarpino's avatar Andrea Scarpino 提交者: Achilleas Pipinellis
浏览文件

docs: fix wrong example to sort artifacts

上级 9477cff7
No related branches found
No related tags found
无相关合并请求
......@@ -446,10 +446,10 @@ List the artifacts for a single project, sorted by artifact size. The output inc
- on-disk location of the artifact
```ruby
p = Project.find_by_id(:project ID)
p = Project.find_by_id(<project_id>)
arts = Ci::JobArtifact.where(project: p)
list = arts.order('sort DESC').limit(50).each do |art|
list = arts.order(size: :desc).limit(50).each do |art|
puts "Job ID: #{art.job_id} - Size: #{art.size}b - Type: #{art.file_type} - Created: #{art.created_at} - File loc: #{art.file}"
end
```
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册