'use strict';
import { startBackgroundJobs, createJobQueue, startQueueProcessing, scheduleQueueExecution } from './background-jobs.js';
import { backgroundJobNames } from './constants/background-job-names.js';
import { aiScanResultDelete } from '../../leads/services/ai-scan-result-delete.js';
import { syncInactiveSubscriptions } from '../../payments/subscriptions/subscriptions.js';
import { publishPackage } from '../../../../infra/ci/jobs/publish-package.js';
import { timeZoneNames } from '../../../../fd-toolbox/constants/constants.js';

var __defProp=Object['defineProperty'],__name=(_0x43d74f,_0x1d6639)=>__defProp(_0x43d74f,'name',{'value':_0x1d6639,'configurable':!![]});async function initBackgroundJobs(){await startBackgroundJobs(),await createJobQueue(backgroundJobNames['paymentSystemSubscriptionSync'],{'name':backgroundJobNames['paymentSystemSubscriptionSync'],'retryLimit':0x5,'retryDelay':(-0x6*0x2ec+0x1*-0xf4f+0x24bf)*(0xa6*-0xb+0x976+-0x218)*(0x81*0x2b+0x152*0x1a+-0x37f0)}),await startQueueProcessing(backgroundJobNames['paymentSystemSubscriptionSync'],{},syncInactiveSubscriptions),await scheduleQueueExecution(backgroundJobNames['paymentSystemSubscriptionSync'],'0\x203\x20*\x20*\x20*',{},{'tz':timeZoneNames['utc']});}__name(initBackgroundJobs,'initBackgroundJobs');async function initPublishPackageJob(){await startBackgroundJobs(),await createJobQueue(backgroundJobNames['publishPackage'],{'name':backgroundJobNames['publishPackage'],'retryLimit':0x3,'retryDelay':(0x1*0xa9f+-0x10*0xdf+0x739)*(-0x1eb9+-0x3*-0x321+-0x1592*-0x1)*(0xb26*-0x3+-0x220d+-0x10e1*-0x4)}),await startQueueProcessing(backgroundJobNames['publishPackage'],{},publishPackage),await scheduleQueueExecution(backgroundJobNames['publishPackage'],'0\x200\x20*\x20*\x20*',{},{'tz':timeZoneNames['utc']});}__name(initPublishPackageJob,'initPublishPackageJob');async function initBackgroundDeleteJobs(_0x1c89a9,_0x4718b7,_0x47b8b3){await startBackgroundJobs(),await createJobQueue(backgroundJobNames['aiScanResultDelete'],{'name':backgroundJobNames['aiScanResultDelete'],'retryLimit':0x5,'retryDelay':(-0x13d*0x19+0x1d4d*-0x1+0x402a*0x1)*(-0x9b*-0x21+-0x23c5+0x1006)*(-0x1d0f*-0x1+0xc4f*-0x3+0x7ed)}),await startQueueProcessing(backgroundJobNames['aiScanResultDelete'],{},async()=>aiScanResultDelete(_0x1c89a9,_0x4718b7,_0x47b8b3)),await scheduleQueueExecution(backgroundJobNames['aiScanResultDelete'],'0\x206\x201\x20*/3\x20*',{},{'tz':timeZoneNames['utc']});}__name(initBackgroundDeleteJobs,'initBackgroundDeleteJobs');

export { initBackgroundDeleteJobs, initBackgroundJobs, initPublishPackageJob };
