Align README, docker-compose, .env.template and stale comment with SMTP mailer #6
5 changed files with 2 additions and 17 deletions
|
|
@ -1,6 +1,4 @@
|
|||
import { instrument } from 'succinct-async'
|
||||
import type { Subscription } from './alert.js'
|
||||
import { getCronExpression } from './alert.js'
|
||||
import * as mailer from './mailer.js'
|
||||
import * as worker from './worker/index.js'
|
||||
import * as db from './database.js'
|
||||
|
|
|
|||
|
|
@ -1,6 +1,3 @@
|
|||
import { CronExpressionParser } from 'cron-parser'
|
||||
import { tryCatch, int, HOUR } from '@welshman/lib'
|
||||
|
||||
export type Subscription = {
|
||||
id: string
|
||||
key: string
|
||||
|
|
|
|||
|
|
@ -1,36 +1,27 @@
|
|||
import { neventEncode, decode } from 'nostr-tools/nip19'
|
||||
import {
|
||||
spec,
|
||||
now,
|
||||
sortBy,
|
||||
groupBy,
|
||||
displayList,
|
||||
nth,
|
||||
nthEq,
|
||||
dateToSeconds,
|
||||
secondsToDate,
|
||||
} from '@welshman/lib'
|
||||
import { parse, truncate, renderAsHtml } from '@welshman/content'
|
||||
import {
|
||||
TrustedEvent,
|
||||
getParentId,
|
||||
getIdFilters,
|
||||
getReplyFilters,
|
||||
NOTE,
|
||||
COMMENT,
|
||||
REACTION,
|
||||
displayProfile,
|
||||
displayPubkey,
|
||||
} from '@welshman/util'
|
||||
import { Loader, AdapterContext, makeLoader, SocketAdapter } from '@welshman/net'
|
||||
import { Router, addMinimalFallbacks } from '@welshman/router'
|
||||
import { call } from '@welshman/lib'
|
||||
import { Router } from '@welshman/router'
|
||||
import { displayDuration, createElement } from './util.js'
|
||||
import type { Subscription } from './alert.js'
|
||||
import { sendDigest } from './mailer.js'
|
||||
import {
|
||||
profilesByPubkey,
|
||||
loadRelaySelections,
|
||||
loadProfile,
|
||||
} from './repository.js'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import 'dotenv/config'
|
||||
import { always } from '@welshman/lib'
|
||||
import { normalizeRelayUrl } from '@welshman/util'
|
||||
import { netContext } from '@welshman/net'
|
||||
import { Nip01Signer } from '@welshman/signer'
|
||||
import { routerContext } from '@welshman/router'
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ export const removeJob = (sub: Subscription) => {
|
|||
}
|
||||
|
||||
// Daily purge of events older than 7 days
|
||||
const purgeJob = CronJob.from({
|
||||
CronJob.from({
|
||||
cronTime: '0 0 3 * * *', // 3am UTC daily
|
||||
onTick: async () => {
|
||||
const weekAgo = Math.floor(Date.now() / 1000) - 7 * 24 * 3600
|
||||
|
|
|
|||
Loading…
Reference in a new issue