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

supabase / storage / 24106559153

07 Apr 2026 10:01PM UTC coverage: 80.861% (+0.06%) from 80.799%
24106559153

Pull #922

github

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

3197 of 4185 branches covered (76.39%)

Branch coverage included in aggregate %.

551 of 652 new or added lines in 55 files covered. (84.51%)

1 existing line in 1 file now uncovered.

30561 of 37563 relevant lines covered (81.36%)

323.79 hits per line

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

65.33
/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
// Empty ref/host mark system-scoped events and intentionally skip per-tenant shouldSend lookups.
1✔
9
const systemTenant = {
1✔
10
  ref: '',
1✔
11
  host: '',
1✔
12
} as const
1✔
13

1✔
14
const moveJobsSchema = {
1✔
15
  body: {
1✔
16
    type: 'object',
1✔
17
    properties: {
1✔
18
      fromQueue: {
1✔
19
        type: 'string',
1✔
20
      },
1✔
21
      toQueue: {
1✔
22
        type: 'string',
1✔
23
      },
1✔
24
      deleteJobsFromOriginalQueue: {
1✔
25
        type: 'boolean',
1✔
26
        default: false,
1✔
27
      },
1✔
28
    },
1✔
29
    required: ['fromQueue', 'toQueue'],
1✔
30
  },
1✔
31
} as const
1✔
32

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

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

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

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

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

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

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

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

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