Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
app_push
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_server
app_push
Commits
baaabb06
Commit
baaabb06
authored
Dec 25, 2019
by
liangyuzhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ap only
parent
af3f55fc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
app/controllers/pushs_controller.rb
+2
-0
config/application.rb
+2
-1
config/environments/development.rb
+1
-1
No files found.
app/controllers/pushs_controller.rb
View file @
baaabb06
...
@@ -33,6 +33,8 @@ class PushsController < ApplicationController
...
@@ -33,6 +33,8 @@ class PushsController < ApplicationController
user_device_exist
=
false
user_device_exist
=
false
ActiveRecord
::
Base
.
connected_to
(
role:
db_role
)
do
ActiveRecord
::
Base
.
connected_to
(
role:
db_role
)
do
user_device_exist
=
UserDevice
.
where
(
user_id:
params
[
:user_id
]).
exists?
user_device_exist
=
UserDevice
.
where
(
user_id:
params
[
:user_id
]).
exists?
byebug
stale?
(
last_modified:
UserDevice
.
where
(
user_id:
params
[
:user_id
]).
last
.
updated_at
)
end
end
unless
user_device_exist
unless
user_device_exist
...
...
config/application.rb
View file @
baaabb06
...
@@ -9,7 +9,7 @@ Bundler.require(*Rails.groups)
...
@@ -9,7 +9,7 @@ Bundler.require(*Rails.groups)
module
AppPush
module
AppPush
class
Application
<
Rails
::
Application
class
Application
<
Rails
::
Application
# Initialize configuration defaults for originally generated Rails version.
# Initialize configuration defaults for originally generated Rails version.
config
.
load_defaults
5.2
config
.
load_defaults
6.0
require_relative
'../app/services/settings'
require_relative
'../app/services/settings'
# Settings in config/environments/* take precedence over those specified here.
# Settings in config/environments/* take precedence over those specified here.
...
@@ -34,5 +34,6 @@ module AppPush
...
@@ -34,5 +34,6 @@ module AppPush
config
.
active_job
.
queue_adapter
=
:sidekiq
config
.
active_job
.
queue_adapter
=
:sidekiq
config
.
api_only
=
true
end
end
end
end
config/environments/development.rb
View file @
baaabb06
...
@@ -58,5 +58,5 @@ Rails.application.configure do
...
@@ -58,5 +58,5 @@ Rails.application.configure do
# Use an evented file watcher to asynchronously detect changes in source code,
# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
# routes, locales, etc. This feature depends on the listen gem.
config
.
file_watcher
=
ActiveSupport
::
EventedFileUpdateChecker
config
.
file_watcher
=
ActiveSupport
::
EventedFileUpdateChecker
end
end
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