Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
8021b8cb
Commit
8021b8cb
authored
Dec 11, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Geo rake tasks
parent
e7a789f3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
config/application.rb
config/application.rb
+4
-0
lib/tasks/geo.rake
lib/tasks/geo.rake
+5
-9
No files found.
config/application.rb
View file @
8021b8cb
...
...
@@ -51,6 +51,10 @@ module Gitlab
#{
config
.
root
}
/ee/app/helpers
]
)
# Rake tasks ignore the eager loading settings, so we need to set the
# autoload paths explicitly
config
.
autoload_paths
=
config
.
eager_load_paths
.
dup
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
...
...
lib/tasks/geo.rake
View file @
8021b8cb
require
'gitlab/geo'
require
'gitlab/geo/database_tasks'
require
'gitlab/geo/geo_tasks'
task
spec:
[
'geo:db:test:prepare'
]
namespace
:geo
do
...
...
@@ -9,12 +5,12 @@ namespace :geo do
namespace
:db
do
|
ns
|
desc
'Drops the Geo tracking database from config/database_geo.yml for the current RAILS_ENV.'
task
:drop
do
task
drop:
[
:environment
]
do
Gitlab
::
Geo
::
DatabaseTasks
.
drop_current
end
desc
'Creates the Geo tracking database from config/database_geo.yml for the current RAILS_ENV.'
task
:create
do
task
create:
[
:environment
]
do
Gitlab
::
Geo
::
DatabaseTasks
.
create_current
end
...
...
@@ -60,7 +56,7 @@ namespace :geo do
end
desc
'Refresh Foreign Tables definition in Geo Secondary node'
task
:refresh_foreign_tables
do
task
refresh_foreign_tables:
[
:environment
]
do
if
Gitlab
::
Geo
::
GeoTasks
.
foreign_server_configured?
print
"
\n
Refreshing foreign tables for FDW:
#{
Gitlab
::
Geo
::
FDW_SCHEMA
}
... "
Gitlab
::
Geo
::
GeoTasks
.
refresh_foreign_tables!
...
...
@@ -72,7 +68,7 @@ namespace :geo do
end
# IMPORTANT: This task won't dump the schema if ActiveRecord::Base.dump_schema_after_migration is set to false
task
:_dump
do
task
_dump:
[
:environment
]
do
if
Gitlab
::
Geo
::
DatabaseTasks
.
dump_schema_after_migration?
ns
[
"schema:dump"
].
invoke
end
...
...
@@ -156,7 +152,7 @@ namespace :geo do
Gitlab
::
Geo
::
DatabaseTasks
::
Test
.
purge
end
task
:refresh_foreign_tables
do
task
refresh_foreign_tables:
[
:environment
]
do
old_env
=
ActiveRecord
::
Tasks
::
DatabaseTasks
.
env
ActiveRecord
::
Tasks
::
DatabaseTasks
.
env
=
'test'
...
...
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