• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / storage / 17546910223

08 Sep 2025 09:55AM UTC coverage: 75.974% (-0.3%) from 76.23%
17546910223

push

github

web-flow
fix: use exactly once queue semantics for specific events (#755)

1669 of 2425 branches covered (68.82%)

Branch coverage included in aggregate %.

57 of 178 new or added lines in 9 files covered. (32.02%)

1 existing line in 1 file now uncovered.

20903 of 27285 relevant lines covered (76.61%)

99.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

65.08
/src/http/routes/admin/queue.ts
1
import { FastifyInstance, RequestGenericInterface } from 'fastify'
1✔
2
import apiKey from '../../plugins/apikey'
1✔
3
import { getConfig } from '../../../config'
1✔
4
import { MoveJobs, UpgradePgBossV10 } from '@storage/events'
1✔
5
import { FromSchema } from 'json-schema-to-ts'
1✔
6

1✔
7
const { pgQueueEnable } = getConfig()
1✔
8

1✔
9
const moveJobsSchema = {
1✔
10
  body: {
1✔
11
    type: 'object',
1✔
12
    properties: {
1✔
13
      fromQueue: {
1✔
14
        type: 'string',
1✔
15
      },
1✔
16
      toQueue: {
1✔
17
        type: 'string',
1✔
18
      },
1✔
19
      deleteJobsFromOriginalQueue: {
1✔
20
        type: 'boolean',
1✔
21
        default: false,
1✔
22
      },
1✔
23
    },
1✔
24
    required: ['fromQueue', 'toQueue'],
1✔
25
  },
1✔
26
} as const
1✔
27

1✔
28
interface MoveJobsRequestInterface extends RequestGenericInterface {
1✔
29
  Body: FromSchema<typeof moveJobsSchema.body>
1✔
30
}
1✔
31

1✔
32
export default async function routes(fastify: FastifyInstance) {
1✔
33
  fastify.register(apiKey)
1✔
34

1✔
35
  fastify.post('/migrate/pgboss-v10', async (req, reply) => {
1✔
36
    if (!pgQueueEnable) {
×
37
      return reply.status(400).send({ message: 'Queue is not enabled' })
×
38
    }
×
39

×
40
    await UpgradePgBossV10.send({})
×
41

×
42
    return reply.send({ message: 'Migration scheduled' })
×
43
  })
1✔
44

1✔
45
  fastify.post<MoveJobsRequestInterface>('/move', async (req, reply) => {
1✔
NEW
46
    if (!pgQueueEnable) {
×
NEW
47
      return reply.status(400).send({ message: 'Queue is not enabled' })
×
NEW
48
    }
×
NEW
49

×
NEW
50
    const fromQueue = req.body.fromQueue
×
NEW
51
    const toQueue = req.body.toQueue
×
NEW
52
    const deleteJobsFromOriginalQueue = req.body.deleteJobsFromOriginalQueue || false
×
NEW
53

×
NEW
54
    await MoveJobs.send({
×
NEW
55
      fromQueue,
×
NEW
56
      toQueue,
×
NEW
57
      deleteJobsFromOriginalQueue,
×
NEW
58
    })
×
NEW
59

×
NEW
60
    return reply.send({ message: 'Move jobs scheduled' })
×
61
  })
1✔
62
}
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc