Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
R
red-ci-cd
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
red-group-test
red-ci-cd
Commits
bf1b0603
Commit
bf1b0603
authored
Mar 04, 2020
by
John Red Medrano
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'core-dev' into 'core-sit'
Core dev See merge request rms/Backend/api-main-service!930
parents
76c7433c
010edadc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
17 deletions
+8
-17
app/applicationlayer/utils.py
app/applicationlayer/utils.py
+8
-17
No files found.
app/applicationlayer/utils.py
View file @
bf1b0603
...
...
@@ -17,33 +17,24 @@ import pusher
import
os
import
configparser
config
=
configparser
.
ConfigParser
()
config_file
=
os
.
path
.
join
(
'./'
,
'env.ini'
)
config
.
read
(
config_file
)
REALTIMESERVER_IP
=
settings
.
REALTIMESERVER_IP
app_id
=
config
[
'SETTINGS'
][
'app_id'
],
key
=
config
[
'SETTINGS'
][
'key'
]
secret
=
config
[
'SETTINGS'
][
'secret'
]
cluster
=
config
[
'SETTINGS'
][
'cluster'
]
ssl
=
True
if
config
[
'SETTINGS'
][
'ssl'
]
==
1
else
False
cms_notification
=
config
[
'SETTINGS'
][
'cms_notification'
]
SSL
=
False
if
config
[
'SETTINGS'
][
'SSL'
]
==
1
else
True
def
rms_websocket
(
my_channel
,
my_event
,
msg
):
pusher_client
=
pusher
.
Pusher
(
app_id
=
app_id
,
key
=
key
,
secret
=
secret
,
cluster
=
cluster
,
ssl
=
ssl
app_id
=
'957253'
,
key
=
'c29a7f6579108991e79e'
,
secret
=
'b3df5d55196b5fbd3eff'
,
cluster
=
'ap1'
,
ssl
=
True
)
pusher_client
.
trigger
(
my_channel
,
my_event
,
msg
# 'my-channel', 'my-event', {'message': 'hello world'}
)
...
...
@@ -245,7 +236,7 @@ def notification_create(form_code, message, account_no,
# 'NEW NOTIFICATIONS'
# )
if
ssl
!=
1
:
if
SSL
!=
True
:
send_broadcast_message
(
ROOM
,
SENDER
,
...
...
@@ -254,7 +245,7 @@ def notification_create(form_code, message, account_no,
else
:
rms_websocket
(
ROOM
,
cms_notification
,
'cms-notification'
,
{
'message'
:
'NEW NOTIFICATIONS'
}
)
...
...
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