-
Notifications
You must be signed in to change notification settings - Fork 973
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release.24.10' into next
- Loading branch information
Showing
14 changed files
with
218 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Countly Push Plugin | ||
|
||
These URLs need to be accessible by the Countly instance: | ||
|
||
- for Android: | ||
- fcm.googleapis.com | ||
- accounts.google.com | ||
- for IOS: | ||
- api.development.push.apple.com | ||
- api.push.apple.com | ||
- for Huawei | ||
- push-api.cloud.huawei.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use strict'; | ||
/** | ||
* @typedef {import("mongodb").Db} MongoDb | ||
*/ | ||
|
||
const { Job } = require('../../../../api/parts/jobs/job.js'); | ||
const log = require('../../../../api/utils/log.js')('job:push:clear-stats'); | ||
|
||
const EXPIRY = 30 * 24 * 60 * 60 * 1000; // 30 days | ||
|
||
/** | ||
* Clears push_stats collection | ||
*/ | ||
class ClearStatsJob extends Job { | ||
/** | ||
* Clears push_stats based on EXPIRY and MAX_RECORDS | ||
* @param {MongoDb} db - db connection | ||
*/ | ||
async run(db) { | ||
log.d('Clearing push_stats'); | ||
await db.collection("push_stats").deleteMany({ | ||
d: { $lte: new Date(Date.now() - EXPIRY) } | ||
}); | ||
} | ||
} | ||
|
||
module.exports = ClearStatsJob; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.