Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
signalboost
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
110
Issues
110
List
Boards
Labels
Service Desk
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
team-friendo
signalboost
Commits
332cf306
Verified
Commit
332cf306
authored
Sep 10, 2020
by
aguestuser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[hotifx] don't notify maintainers about eventless recycle jobs
parent
93f92ad6
Pipeline
#45841
passed with stage
in 1 minute and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
app/registrar/phoneNumber/recycle.js
app/registrar/phoneNumber/recycle.js
+9
-6
No files found.
app/registrar/phoneNumber/recycle.js
View file @
332cf306
...
...
@@ -51,17 +51,20 @@ const processRecycleRequests = async () => {
const
recycleResults
=
await
Promise
.
all
(
toRecycle
.
map
(
recycle
))
await
recycleRequestRepository
.
destroyMany
([...
redeemed
,
...
toRecycle
])
const
redeemedChannels
=
await
channelRepository
.
findManyDeep
(
redeemed
)
const
numProcessed
=
redeemed
.
length
+
toRecycle
.
length
return
Promise
.
all
([
...
redeemedChannels
.
map
(
channel
=>
notifier
.
notifyAdmins
(
channel
,
notificationKeys
.
CHANNEL_REDEEMED
),
),
notifier
.
notifyMaintainers
(
`
${
redeemed
.
length
+
toRecycle
.
length
}
recycle requests processed:\n\n`
+
`
${
redeemed
.
map
(
r
=>
`
${
r
}
redeemed by admins.`
).
join
(
'
\n
'
)}
`
+
'
\n
'
+
`
${
map
(
recycleResults
,
'
message
'
).
join
(
'
\n
'
)}
`
,
),
numProcessed
===
0
?
Promise
.
resolve
()
:
notifier
.
notifyMaintainers
(
`
${
redeemed
.
length
+
toRecycle
.
length
}
recycle requests processed:\n\n`
+
`
${
redeemed
.
map
(
r
=>
`
${
r
}
redeemed by admins.`
).
join
(
'
\n
'
)}
`
+
'
\n
'
+
`
${
map
(
recycleResults
,
'
message
'
).
join
(
'
\n
'
)}
`
,
),
])
}
catch
(
err
)
{
return
notifier
.
notifyMaintainers
(
`Error processing recycle job:
${
err
}
`
)
...
...
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