mirror of
https://github.com/hansjone/dsh-ops-cron.git
synced 2026-10-09 03:03:18 +08:00
Make origin session mirror opt-in per job.
Default mirrorToSession to false so cron summaries stay in run history unless the sidebar checkbox or mirror_to_session is enabled. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
933bad9201
commit
819feed310
10 changed files with 128 additions and 17 deletions
|
|
@ -281,6 +281,7 @@ export function createHostService(options = {}) {
|
|||
|
||||
async function maybeMirrorResult(job, run) {
|
||||
if (!job || !run || run.status === 'skipped') return
|
||||
if (job.mirrorToSession !== true) return
|
||||
try {
|
||||
const result = await mirrorRunToSession(job, run.summary || run.error || '', {
|
||||
dshIm: getDshIm(),
|
||||
|
|
@ -362,6 +363,11 @@ export function createHostService(options = {}) {
|
|||
origin: patch.origin !== undefined
|
||||
? (normalizeOrigin(patch.origin) || undefined)
|
||||
: job.origin,
|
||||
mirrorToSession: patch.mirrorToSession !== undefined
|
||||
? patch.mirrorToSession === true
|
||||
: (patch.mirror_to_session !== undefined
|
||||
? patch.mirror_to_session === true
|
||||
: job.mirrorToSession === true),
|
||||
ownerEmpNo: job.ownerEmpNo || UNASSIGNED_OWNER,
|
||||
ownerDisplayName: job.ownerDisplayName || '',
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue