tip-kudos-recipients: Allow configurable payment periodicity
This commit is contained in:
parent
4690f4c6e0
commit
fe3e42e1d3
|
@ -19,6 +19,7 @@ const tipPerKudoInUsd = parseFloat(options.rules.tip_per_kudo_in_usd)
|
|||
const tipPerReactionInUsd = parseFloat(options.rules.tip_per_reaction_in_usd)
|
||||
const reactionThreshold = parseInt(options.rules.reaction_threshold)
|
||||
const interTransactionDelay = parseInt(options.options.inter_transaction_delay)
|
||||
const paymentPeriodicityInDays = parseInt(options.options.payment_periodicity_in_days)
|
||||
|
||||
const tokenID = process.env.DEBUG ? 'STT' : 'SNT'
|
||||
const token = options.payments[tokenID]
|
||||
|
@ -37,7 +38,7 @@ module.exports = robot => {
|
|||
}
|
||||
|
||||
setTimeout(() => processKudosChannelUpdates(robot), process.env.DISABLE_DELAY ? 1 * 1000 : 30 * 1000)
|
||||
setInterval(() => processKudosChannelUpdates(robot), 24 * 60 * 60 * 1000)
|
||||
setInterval(() => processKudosChannelUpdates(robot), paymentPeriodicityInDays * 24 * 60 * 60 * 1000)
|
||||
}
|
||||
|
||||
function getOptions (optionsString) {
|
||||
|
@ -224,7 +225,7 @@ async function processPendingPayments (robot, data, saveStateAsyncFunc) {
|
|||
}
|
||||
}
|
||||
}
|
||||
robot.log.debug(`Total payments: ${totalPayments}`)
|
||||
robot.log.debug(`Total payments: ${totalPayments} ${tokenID}`)
|
||||
}
|
||||
|
||||
function compareBalances (userToPendingPayouts, a, b) {
|
||||
|
|
Loading…
Reference in New Issue