Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

importJobTtr config ignored in config #445

Closed
arifje opened this issue Dec 30, 2023 · 4 comments
Closed

importJobTtr config ignored in config #445

arifje opened this issue Dec 30, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@arifje
Copy link

arifje commented Dec 30, 2023

I've created a campaign.php in my config folder, set importJobTtr to 1500, but it keeps using 300 seconds (and keeps timing out).

Screenshot 2023-12-30 at 12 35 49

When I change importJobTtr in the SettingsModel.php, it works though.

Screenshot 2023-12-30 at 12 34 59

Looks like the custom config file is ignored for this setting.

Campaign 2.10.0
Craft Pro 4.5.12

@arifje arifje added the bug Something isn't working label Dec 30, 2023
@bencroker
Copy link
Collaborator

bencroker commented Dec 30, 2023

Can you share your full campaign.php config file so I can take a look? (your screenshot shows a different config setting)

@arifje
Copy link
Author

arifje commented Dec 30, 2023

Sure!

<?php
/**
 * @copyright Copyright (c) PutYourLightsOn
 */

/**
 * Campaign config.php
 *
 * This file exists only as a template for the Campaign settings.
 * It does nothing on its own.
 *
 * Don't edit this file, instead copy it to 'craft/config' as 'campaign.php'
 * and make your changes there to override default settings.
 *
 * Once copied to 'craft/config', this file will be multi-environment aware as
 * well, so you can have different settings groups for each environment, just as
 * you do for 'general.php'
 */

return [
    '*' => [
        // Whether to enable anonymous tracking
        //'enableAnonymousTracking' => false,

        // Setting to true will save email messages into local files (in storage/runtime/debug/mail) rather than actually sending them
        //'testMode' => false,

        // An API key to use for triggering tasks and notifications (min. 16 characters)
        //'apiKey' => 'aBcDeFgHiJkLmNoP',

        // A webhook signing key provided by Mailgun to validate incoming webhook requests
        //mailgunWebhookSigningKey => 'key-aBcDeFgHiJkLmNoP',

        // The allowed IP addresses for incoming webhook requests from Postmark
        //postmarkAllowedIpAddresses => [
        //    '3.134.147.250',
        //    '50.31.156.6',
        //    '50.31.156.77',
        //    '18.217.206.57',
        //],

        // The AJAX origins that should be allowed to access live preview
        //'allowedOrigins' => [
        //    'https://primary-domain.com',
        //],

        // Whether verification emails should be sent via the Craft mailer, instead of the Campaign mailer
        //'sendVerificationEmailsViaCraft' => false,

        // The from names and emails that sendouts can be sent from
        //'fromNamesEmails' => [
        //    ['Zorro','[email protected]','[email protected]',1],
        //    ['Don Diego','[email protected]','',1],
        //],

        // The transport type that should be used
        //'transportType' => 'putyourlightson\sendgrid\mail\SendgridAdapter',

        // The transport type’s settings
        //'transportSettings' => ['apiKey' => 'aBcDeFgHiJkLmNoP'],

        // Default notification contact IDs
        //'defaultNotificationContactIds' = [1],

        // The maximum size of sendout batches
        'maxBatchSize' => 1000,

        // The memory usage limit per sendout batch in bytes or a shorthand byte value (set to -1 for unlimited)
        'memoryLimit' => '16384M',

        // The execution time limit per sendout batch in seconds (set to 0 for unlimited)
        'timeLimit' => 0,

        // The threshold for memory usage per sendout batch as a fraction
        //'memoryThreshold' => 0.8,

        // The threshold for execution time per sendout batch as a fraction
        //'timeThreshold' => 0.8,

        // The amount of time in seconds to delay jobs between sendout batches
        'batchJobDelay' => 30,

        // The maximum number of times to attempt sending a sendout to a single contact before failing
        //'maxSendAttempts' => 3,

        // The maximum number of failed attempts to send to contacts that are allowed before failing the entire sendout
        //'maxSendFailuresAllowed' => 1,

        // The maximum number of times to attempt retrying a failed sendout job
        //'maxRetryAttempts' => 10,

				// The amount of time in seconds to reserve a sendout job
				'sendoutJobTtr' => 900,
				
				// The priority to give the sendout cache job (the lower the number, the higher the priority)
				//'sendoutJobPriority' => 10,
				
				// The amount of time in seconds to reserve an import job
				'importJobTtr' => 1500,
				
				// The priority to give the import job (the lower the number, the higher the priority).
				//'importJobPriority' => 2048,
				
				// The amount of time in seconds to reserve a sync job
				'syncJobTtr' => 1500,
				
        // Enable GeoIP to geolocate contacts by their IP addresses
        //'geoIp' => false,

        // The ipstack.com API key
        //'ipstackApiKey' => 'aBcDeFgHiJkLmNoP',

        // Enable reCAPTCHA to protect mailing list subscription forms from bots
        //'reCaptcha' => false,

        // The reCAPTCHA site key
        //'reCaptchaSiteKey' => 'aBcDeFgHiJkLmNoP',

        // The reCAPTCHA secret key
        //'reCaptchaSecretKey' => 'aBcDeFgHiJkLmNoP',

        // The reCAPTCHA error message
        //'reCaptchaErrorMessage' => 'Your form submission was blocked. Please go back and verify that you are human.',

        // The maximum number of pending contacts to store per email address and mailing list
        //'maxPendingContacts' => 5,

        // The amount of time to wait before purging pending contacts in seconds or as an interval (0 for disabled)
        //'purgePendingContactsDuration' => 0,

        // Extra fields and their operators that should be available to segments
        //'extraSegmentFieldOperators' => [
        //    'mmikkel\incognitofield\fields\IncognitoFieldType' => [
        //        '=' => 'is',
        //        '!=' => 'is not',
        //        'like' => 'contains',
        //        'not like' => 'does not contain',
        //        'like v%' => 'starts with',
        //        'not like v%' => 'does not start with',
        //        'like %v' => 'ends with',
        //        'not like %v' => 'does not end with',
        //    ]
        //],
    ],
];

@bencroker
Copy link
Collaborator

Thanks, I believe I’ve tracked down the issue and fixed in d64bdeb.

You can test this by running composer require "putyourlightson/craft-campaign:dev-develop as 2.11.1".

@bencroker
Copy link
Collaborator

Released in 2.12.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants