Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
8c471cb3
Commit
8c471cb3
authored
9 years ago
by
Marcelo Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
Fixed trying to read build from RocketChat.Info when it is not available.
parent
ea388604
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
packages/rocketchat-migrations/migrations.js
+3
-2
3 additions, 2 deletions
packages/rocketchat-migrations/migrations.js
with
3 additions
and
2 deletions
packages/rocketchat-migrations/migrations.js
+
3
−
2
View file @
8c471cb3
...
...
@@ -302,6 +302,7 @@ Migrations._migrateTo = function(version, rerun) {
function
lock
()
{
const
date
=
new
Date
();
const
dateMinusInterval
=
moment
(
date
).
subtract
(
self
.
options
.
lockExpiration
,
'
minutes
'
).
toDate
();
const
build
=
RocketChat
.
Info
?
RocketChat
.
Info
.
build
.
date
:
date
;
// This is atomic. The selector ensures only one caller at a time will see
// the unlocked control, and locking occurs in the same update's modifier.
...
...
@@ -316,14 +317,14 @@ Migrations._migrateTo = function(version, rerun) {
}
},
{
buildAt
:
{
$ne
:
RocketChat
.
Info
.
build
.
date
$ne
:
build
}
}]
},
{
$set
:
{
locked
:
true
,
lockedAt
:
date
,
buildAt
:
RocketChat
.
Info
.
build
.
date
buildAt
:
build
}
})
===
1
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment