Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
srvpro
Commits
ac56014b
Commit
ac56014b
authored
4 years ago
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix again random cloud replay
parent
3aa26a21
No related merge requests found
Pipeline
#1226
passed with stage
in 9 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
data-manager/DataManager.ts
data-manager/DataManager.ts
+3
-2
No files found.
data-manager/DataManager.ts
View file @
ac56014b
...
...
@@ -101,10 +101,11 @@ export class DataManager {
.
from
(
CloudReplay
,
"
replay
"
)
.
getRawOne
()
));
if
(
!
minQuery
||
maxQuery
)
{
if
(
!
minQuery
||
!
maxQuery
)
{
return
null
;
}
const
targetId
=
Math
.
floor
((
maxQuery
.
value
-
minQuery
.
value
)
*
Math
.
random
())
+
minQuery
.
value
;
const
[
maxId
,
minId
]
=
[
minQuery
,
maxQuery
].
map
(
query
=>
parseInt
(
query
.
value
));
const
targetId
=
Math
.
floor
((
maxId
-
minId
)
*
Math
.
random
())
+
minId
;
return
await
this
.
db
.
createQueryBuilder
(
CloudReplay
,
"
replay
"
)
.
where
(
"
replay.id >= :targetId
"
,
{
targetId
})
.
orderBy
(
"
replay.id
"
,
"
ASC
"
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment