Skip to content

Commit cad63d4

Browse files
committed
Updated
1 parent daf42bf commit cad63d4

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

pkg/pgqueue/config/task.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,11 @@ func (t *task) Conn() pg.PoolConn {
167167
return t.manager.Conn()
168168
}
169169

170+
// Namespace returns the namespace of the queue.
171+
func (t *task) Namespace() string {
172+
return t.manager.Namespace()
173+
}
174+
170175
// RegisterTicker registers a periodic task (ticker) with a callback function.
171176
// It returns the metadata of the registered ticker.
172177
func (t *task) RegisterTicker(ctx context.Context, meta schema.TickerMeta, fn server.PGCallback) (*schema.Ticker, error) {

plugin.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ type PGQueue interface {
119119
// Conn returns the underlying connection pool object.
120120
Conn() pg.PoolConn
121121

122+
// Namespace returns the namespace of the queue.
123+
Namespace() string
124+
122125
// RegisterTicker registers a periodic task (ticker) with a callback function.
123126
// It returns the metadata of the registered ticker.
124127
RegisterTicker(context.Context, pgschema.TickerMeta, PGCallback) (*pgschema.Ticker, error)

0 commit comments

Comments
 (0)