Skip to content

Commit 1014ac0

Browse files
committed
Document admin mode for gds.beta.listProgress
1 parent ae55b8d commit 1014ac0

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

doc-test-tools/src/main/java/org/neo4j/gds/doc/syntax/SyntaxMode.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public enum SyntaxMode {
5858
PIPELINE_LIST("pipeline-list-syntax"),
5959
PIPELINE_EXISTS("pipeline-exists-syntax"),
6060
PIPELINE_DROP("pipeline-drop-syntax"),
61+
LIST_PROGRESS("listProgress-syntax"),
62+
USER_LOG("userlog-syntax", false),
6163
SYSTEM_MONITOR("system-monitor-syntax", false),
6264
SYS_INFO("debug-sysinfo-syntax", false),
6365
WRITE_NODE_LABEL("include-with-write-node-label", false),;
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) "Neo4j"
3+
* Neo4j Sweden AB [http://neo4j.com]
4+
*
5+
* This file is part of Neo4j.
6+
*
7+
* Neo4j is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* This program is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.neo4j.gds.doc.syntax;
21+
22+
import java.util.List;
23+
24+
class LoggingSyntaxTest extends SyntaxTestBase {
25+
26+
@Override
27+
protected Iterable<SyntaxModeMeta> syntaxModes() {
28+
return List.of(
29+
SyntaxModeMeta.of(SyntaxMode.LIST_PROGRESS),
30+
SyntaxModeMeta.of(SyntaxMode.USER_LOG)
31+
);
32+
}
33+
34+
@Override
35+
protected String adocFile() {
36+
return "pages/common-usage/logging.adoc";
37+
}
38+
}

doc/modules/ROOT/pages/common-usage/logging.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,22 @@ Second, if the `jobId` parameter is set it will show a detailed view for the giv
3737
The detailed view will produce a row for each step or task that job will perform during execution.
3838
It will also show how tasks are structured as a tree and print progress for each individual task.
3939

40+
[NOTE]
41+
====
42+
For administrator users, this procedure will also list the running tasks from other users.
43+
====
4044

4145
[[logging-progress-logging-syntax]]
4246
=== Syntax
4347

48+
[.listProgress-syntax]
49+
--
4450
.Getting the progress of tasks:
4551
[source, cypher, role=noplay]
4652
----
4753
CALL gds.beta.listProgress(jobId: String)
4854
YIELD
55+
username,
4956
jobId,
5057
taskName,
5158
progress,
@@ -66,6 +73,7 @@ YIELD
6673
[opts="header",cols="2m,1,6"]
6774
|===
6875
| Name | Type | Description
76+
| username | String | The user who started the running task.
6977
| jobId | String | A generated identifier of the running task.
7078
| taskName | String | The name of the running task, i.e. `Node2Vec`.
7179
| progress | String | The progress of the job shown as a percentage value.
@@ -74,6 +82,7 @@ YIELD
7482
| timeStarted | LocalTime | The local wall clock time when the task has been started.
7583
| elapsedTime | Duration | The duration from `timeStarted` to now.
7684
|===
85+
--
7786

7887
[NOTE]
7988
====
@@ -119,6 +128,8 @@ When a user calls procedure `gds.alpha.userLog`, their respective list of genera
119128
[[userlog-syntax]]
120129
=== Syntax
121130

131+
[.userlog-syntax]
132+
--
122133
.Getting the hints and warnings for a user:
123134
[source,cypher,role=noplay]
124135
----
@@ -137,6 +148,7 @@ YIELD
137148
|timeStarted | LocalTime | The local wall clock time when the task has been started.
138149
| message | String | A hint or warning associated with the task.
139150
|===
151+
--
140152

141153

142154
[[userlog-examples]]

0 commit comments

Comments
 (0)