mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-09-30 06:16:37 +08:00
999428cf9a
为 GitHub latest 来源增加五分钟 scanner、按来源间隔检查、精确 revision 自动发布与租约恢复。\n记录退避和投递统计,并为 PostgreSQL 与 SQLite 幂等创建内部排程。
52 lines
1.3 KiB
Go
52 lines
1.3 KiB
Go
// Copyright 2026 Arctel.net
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package pages
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"github.com/Rain-kl/Wavelet/internal/apps/upload"
|
|
"github.com/Rain-kl/Wavelet/internal/model"
|
|
)
|
|
|
|
func syncRemoteSource(
|
|
ctx context.Context,
|
|
snapshot *sourceExecutionSnapshot,
|
|
actor string,
|
|
) (*sourceSyncOutcome, error) {
|
|
return syncRemoteSourceWithTrigger(ctx, snapshot, actor, pagesSourceTriggerManualSync)
|
|
}
|
|
|
|
func syncGitHubSource(
|
|
ctx context.Context,
|
|
snapshot *sourceExecutionSnapshot,
|
|
actor string,
|
|
targetRevision string,
|
|
confirmedRevision string,
|
|
) (*sourceSyncOutcome, error) {
|
|
return syncGitHubSourceWithTrigger(
|
|
ctx, snapshot, actor, targetRevision, confirmedRevision, pagesSourceTriggerManualSync,
|
|
)
|
|
}
|
|
|
|
func commitSourceDeployment(
|
|
ctx context.Context,
|
|
snapshot *sourceExecutionSnapshot,
|
|
revision string,
|
|
packageChecksum string,
|
|
detail sourceDetail,
|
|
detailJSON string,
|
|
actor string,
|
|
manifest *deploymentManifest,
|
|
ingestResult upload.IngestResult,
|
|
hasIngest bool,
|
|
nextCheckNotBefore *time.Time,
|
|
) (*model.PagesDeployment, bool, bool, error) {
|
|
return commitSourceDeploymentWithTrigger(
|
|
ctx, snapshot, revision, packageChecksum, detail, detailJSON, actor,
|
|
pagesSourceTriggerManualSync, manifest, ingestResult, hasIngest, nextCheckNotBefore,
|
|
)
|
|
}
|