postgres

package
v0.0.0-...-9944d71 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProvider

func NewProvider(db *sql.DB, opts ...ProviderOption) scrapemate.JobProvider

func NewResultWriter

func NewResultWriter(db *sql.DB) scrapemate.ResultWriter

func NewResultWriterWithSync

func NewResultWriterWithSync(cfg ResultWriterConfig) scrapemate.ResultWriter

NewResultWriterWithSync creates a result writer that syncs progress back to parent jobs

func UpdateParentJobProgress

func UpdateParentJobProgress(ctx context.Context, db *sql.DB, parentJobID string) error

UpdateParentJobProgress updates the progress of a parent job based on gmaps_jobs completion. This can be called directly to sync progress for a specific parent job.

Types

type GmapsJobPusher

type GmapsJobPusher interface {
	Push(ctx context.Context, job scrapemate.IJob) error
	PushWithParent(ctx context.Context, job scrapemate.IJob, parentID string) error
}

GmapsJobPusher interface for pushing jobs to gmaps_jobs table. Used by JobService to bridge Dashboard jobs to DSN workers.

func NewGmapsJobPusher

func NewGmapsJobPusher(db *sql.DB) GmapsJobPusher

NewGmapsJobPusher creates a GmapsJobPusher for pushing jobs to gmaps_jobs. Used by JobService to bridge Dashboard jobs to DSN workers.

type ProviderOption

type ProviderOption func(*provider)

ProviderOption allows configuring the provider

func WithBatchSize

func WithBatchSize(size int) ProviderOption

WithBatchSize sets custom batch size

type ResultWriterConfig

type ResultWriterConfig struct {
	DB                 *sql.DB
	SyncParentProgress bool // Enable syncing progress back to jobs_queue
}

ResultWriterConfig configures the result writer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL