Skip to content

Commit

Permalink
allows env variable to control bg worker flag
Browse files Browse the repository at this point in the history
  • Loading branch information
iturgeon committed Nov 18, 2017
1 parent de25306 commit e94d6e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
"CANVAS_NAV_ITEM_NAME" : {
"description": "The text displayed in the canvas navigation menu to launch this app",
"value": "UDOIT"
},
"WORKER_ENABLED": {
"description": "Enable the background worker (requires you turn on the worker dyno).",
"value": "true"
}
},
"addons": [
Expand Down
2 changes: 1 addition & 1 deletion config/herokuConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
$dsn = "pgsql:host={$db_host};dbname={$db_name};user={$db_user};port={$db_port};sslmode=require;password={$db_password}";

/* Background worker Options */
$background_worker_enabled = true;
$background_worker_enabled = (getenv("WORKER_ENABLED")) ?: true;
$background_worker_sleep_seconds = 7;

/* Disable headings check character count */
Expand Down
4 changes: 2 additions & 2 deletions config/localConfig.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
$unscannable_suggestion_on = true;

/* Tool name for display in Canvas Navigation */
$canvas_nav_item_name = getenv('CANVAS_NAV_ITEM_NAME');
$canvas_nav_item_name = (getenv('CANVAS_NAV_ITEM_NAME')) ?: 'UDOIT';

/* Google/YouTube Data Api Key */
define('GOOGLE_API_KEY', '');
Expand All @@ -40,7 +40,7 @@

// added in v2.3.0
// Background worker Options (See Background Workers in Readme)
$background_worker_enabled = false;
$background_worker_enabled = (getenv("WORKER_ENABLED")) ?: false;
$background_job_expire_time = 20; // after x Minutes, mark job as expired
$background_worker_sleep_seconds = 7;

Expand Down

0 comments on commit e94d6e5

Please sign in to comment.