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

supabase / storage / 17495766024

05 Sep 2025 02:16PM UTC coverage: 75.968% (-0.3%) from 76.23%
17495766024

Pull #755

github

web-flow
Merge b73c89fe8 into 6e33350ba
Pull Request #755: fix: use exactly once queue semantics for specific events

1669 of 2425 branches covered (68.82%)

Branch coverage included in aggregate %.

62 of 187 new or added lines in 9 files covered. (33.16%)

1 existing line in 1 file now uncovered.

20908 of 27294 relevant lines covered (76.6%)

99.03 hits per line

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

65.22
/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
      deleteOriginalQueue: {
1✔
20
        type: 'boolean',
1✔
21
        default: false,
1✔
22
      },
1✔
23
      deleteJobsFromOriginalQueue: {
1✔
24
        type: 'boolean',
1✔
25
        default: false,
1✔
26
      },
1✔
27
    },
1✔
28
    required: ['fromQueue', 'toQueue'],
1✔
29
  },
1✔
30
} as const
1✔
31

1✔
32
interface MoveJobsRequestInterface extends RequestGenericInterface {
1✔
33
  Body: FromSchema<typeof moveJobsSchema.body>
1✔
34
}
1✔
35

1✔
36
export default async function routes(fastify: FastifyInstance) {
1✔
37
  fastify.register(apiKey)
1✔
38

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

×
44
    await UpgradePgBossV10.send({})
×
45

×
46
    return reply.send({ message: 'Migration scheduled' })
×
47
  })
1✔
48

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

×
NEW
54
    const fromQueue = req.body.fromQueue
×
NEW
55
    const toQueue = req.body.toQueue
×
NEW
56
    const deleteOriginalQueue = req.body.deleteOriginalQueue || false
×
NEW
57
    const deleteJobsFromOriginalQueue = req.body.deleteJobsFromOriginalQueue || false
×
NEW
58

×
NEW
59
    await MoveJobs.send({
×
NEW
60
      fromQueue,
×
NEW
61
      toQueue,
×
NEW
62
      deleteOriginalQueue,
×
NEW
63
      deleteJobsFromOriginalQueue,
×
NEW
64
    })
×
NEW
65

×
NEW
66
    return reply.send({ message: 'Move jobs scheduled' })
×
67
  })
1✔
68
}
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