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

supabase / storage / 29397915687

15 Jul 2026 07:36AM UTC coverage: 58.511% (-20.9%) from 79.363%
29397915687

Pull #1230

github

web-flow
Merge 9b3616757 into 5e9d4227f
Pull Request #1230: feat: Added separate Database application.

3563 of 6966 branches covered (51.15%)

Branch coverage included in aggregate %.

11 of 127 new or added lines in 4 files covered. (8.66%)

2373 existing lines in 100 files now uncovered.

7519 of 11974 relevant lines covered (62.79%)

383.06 hits per line

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

26.67
/src/http/routes/admin/queue.ts
1
import { SYSTEM_TENANT } from '@internal/queue/constants'
2
import { MoveJobs } from '@storage/events'
3
import { FastifyInstance, RequestGenericInterface } from 'fastify'
4
import { FromSchema } from 'json-schema-to-ts'
5
import { getConfig } from '../../../config'
6
import { registerApiKeyAuth } from '../../plugins/apikey'
7

8
const { pgQueueEnable } = getConfig()
28✔
9

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

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

33
export default async function routes(fastify: FastifyInstance) {
34
  registerApiKeyAuth(fastify)
11✔
35

36
  fastify.post<MoveJobsRequestInterface>(
11✔
37
    '/move',
38
    { schema: { ...moveJobsSchema, tags: ['queue'] } },
39
    async (req, reply) => {
UNCOV
40
      if (!pgQueueEnable) {
×
41
        return reply.status(400).send({ message: 'Queue is not enabled' })
×
42
      }
43

UNCOV
44
      const fromQueue = req.body.fromQueue
×
UNCOV
45
      const toQueue = req.body.toQueue
×
UNCOV
46
      const deleteJobsFromOriginalQueue = req.body.deleteJobsFromOriginalQueue || false
×
47

UNCOV
48
      await MoveJobs.send({
×
49
        fromQueue,
50
        toQueue,
51
        deleteJobsFromOriginalQueue,
52
        sbReqId: req.sbReqId,
53
        tenant: SYSTEM_TENANT,
54
      })
55

UNCOV
56
      return reply.send({ message: 'Move jobs scheduled' })
×
57
    }
58
  )
59
}
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