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

supabase / storage / 24104957976

07 Apr 2026 09:19PM UTC coverage: 80.86% (+0.06%) from 80.799%
24104957976

Pull #922

github

web-flow
Merge 3ae9e3582 into 7cb07b546
Pull Request #922: fix: no any rule

3197 of 4185 branches covered (76.39%)

Branch coverage included in aggregate %.

548 of 649 new or added lines in 55 files covered. (84.44%)

1 existing line in 1 file now uncovered.

30558 of 37560 relevant lines covered (81.36%)

323.81 hits per line

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

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

1✔
7
const { pgQueueEnable } = getConfig()
1✔
8
const systemTenant = {
1✔
9
  ref: '',
1✔
10
  host: '',
1✔
11
} as const
1✔
12

1✔
13
const moveJobsSchema = {
1✔
14
  body: {
1✔
15
    type: 'object',
1✔
16
    properties: {
1✔
17
      fromQueue: {
1✔
18
        type: 'string',
1✔
19
      },
1✔
20
      toQueue: {
1✔
21
        type: 'string',
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)
8✔
38

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

×
NEW
44
    await UpgradePgBossV10.send({
×
NEW
45
      tenant: systemTenant,
×
NEW
46
    })
×
47

×
48
    return reply.send({ message: 'Migration scheduled' })
×
49
  })
8✔
50

8✔
51
  fastify.post<MoveJobsRequestInterface>(
8✔
52
    '/move',
8✔
53
    { schema: { tags: ['queue'] } },
8✔
54
    async (req, reply) => {
8✔
55
      if (!pgQueueEnable) {
×
56
        return reply.status(400).send({ message: 'Queue is not enabled' })
×
57
      }
×
58

×
59
      const fromQueue = req.body.fromQueue
×
60
      const toQueue = req.body.toQueue
×
61
      const deleteJobsFromOriginalQueue = req.body.deleteJobsFromOriginalQueue || false
×
62

×
63
      await MoveJobs.send({
×
64
        fromQueue,
×
65
        toQueue,
×
66
        deleteJobsFromOriginalQueue,
×
NEW
67
        tenant: systemTenant,
×
68
      })
×
69

×
70
      return reply.send({ message: 'Move jobs scheduled' })
×
71
    }
×
72
  )
8✔
73
}
8✔
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