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

supabase / storage / 23586183444

26 Mar 2026 09:07AM UTC coverage: 77.101% (-0.03%) from 77.134%
23586183444

push

github

web-flow
fix: update api spec, add admin api spec, add release action to publish versioned spec (#932)

4183 of 5925 branches covered (70.6%)

Branch coverage included in aggregate %.

349 of 474 new or added lines in 14 files covered. (73.63%)

1 existing line in 1 file now uncovered.

27393 of 35029 relevant lines covered (78.2%)

184.64 hits per line

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

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

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

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

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

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

2✔
35
  fastify.post('/migrate/pgboss-v10', { schema: { tags: ['queue'] } }, async (req, reply) => {
2✔
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
  })
2✔
44

2✔
45
  fastify.post<MoveJobsRequestInterface>(
2✔
46
    '/move',
2✔
47
    { schema: { tags: ['queue'] } },
2✔
48
    async (req, reply) => {
2✔
NEW
49
      if (!pgQueueEnable) {
×
NEW
50
        return reply.status(400).send({ message: 'Queue is not enabled' })
×
NEW
51
      }
×
52

×
NEW
53
      const fromQueue = req.body.fromQueue
×
NEW
54
      const toQueue = req.body.toQueue
×
NEW
55
      const deleteJobsFromOriginalQueue = req.body.deleteJobsFromOriginalQueue || false
×
56

×
NEW
57
      await MoveJobs.send({
×
NEW
58
        fromQueue,
×
NEW
59
        toQueue,
×
NEW
60
        deleteJobsFromOriginalQueue,
×
NEW
61
      })
×
62

×
NEW
63
      return reply.send({ message: 'Move jobs scheduled' })
×
NEW
64
    }
×
65
  )
2✔
66
}
2✔
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