Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
condenser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
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
hive
condenser
Commits
dedf939b
Commit
dedf939b
authored
8 years ago
by
Tim Fesenko
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #1021 from steemit/web-push-notifications-update
Web push notifications update
parents
298c9ee2
560dd09f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/webpush_notify.js
+2
-4
2 additions, 4 deletions
scripts/webpush_notify.js
with
2 additions
and
4 deletions
scripts/webpush_notify.js
+
2
−
4
View file @
dedf939b
...
@@ -21,13 +21,13 @@ function notify(account, nparams, title, body, url, pic) {
...
@@ -21,13 +21,13 @@ function notify(account, nparams, title, body, url, pic) {
}
}
async
function
process_queue
()
{
async
function
process_queue
()
{
console
.
log
(
'
-- processing web push notifications queue -->
'
);
try
{
try
{
const
queue
=
await
Tarantool
.
instance
().
call
(
'
webpush_get_delivery_queue
'
);
const
queue
=
await
Tarantool
.
instance
().
call
(
'
webpush_get_delivery_queue
'
);
console
.
log
(
'
processing web push notifications queue, length:
'
,
queue
.
length
);
for
(
const
n
of
queue
)
{
for
(
const
n
of
queue
)
{
if
(
n
.
length
===
0
)
return
;
if
(
n
.
length
===
0
)
return
;
const
[
account
,
nparams_array
,
title
,
body
,
url
,
pic
]
=
n
;
const
[
account
,
nparams_array
,
title
,
body
,
url
,
pic
]
=
n
;
console
.
log
(
'
--
notification
-->
'
,
account
,
body
,
url
,
pic
);
console
.
log
(
'
notification
:
'
,
account
,
body
,
url
,
pic
);
for
(
const
nparams
of
nparams_array
)
{
for
(
const
nparams
of
nparams_array
)
{
try
{
try
{
await
notify
(
account
,
nparams
,
title
,
body
,
url
,
pic
);
await
notify
(
account
,
nparams
,
title
,
body
,
url
,
pic
);
...
@@ -35,7 +35,6 @@ async function process_queue() {
...
@@ -35,7 +35,6 @@ async function process_queue() {
console
.
error
(
'
-- error in notify -->
'
,
account
,
err
);
console
.
error
(
'
-- error in notify -->
'
,
account
,
err
);
}
}
}
}
break
;
}
}
// console.log('-- run.run -->', queue);
// console.log('-- run.run -->', queue);
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -50,4 +49,3 @@ function run() {
...
@@ -50,4 +49,3 @@ function run() {
}
}
run
();
run
();
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