diff --git a/Changes b/Changes index 31a784a4..9ff2c3ab 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,9 @@ +2.051005 - 2021-11-25 + + [ENHANCEMENTS] + + * do not accept any job queue entries for demo hosting + 2.051004 - 2021-11-25 [BUG FIXES] diff --git a/lib/App/Netdisco/JobQueue/PostgreSQL.pm b/lib/App/Netdisco/JobQueue/PostgreSQL.pm index 7dc58bef..4c9f4b66 100644 --- a/lib/App/Netdisco/JobQueue/PostgreSQL.pm +++ b/lib/App/Netdisco/JobQueue/PostgreSQL.pm @@ -321,8 +321,11 @@ sub jq_userlog { sub jq_insert { my $jobs = shift; $jobs = [$jobs] if ref [] ne ref $jobs; - my $happy = false; + # bit of a hack for heroku hosting to avoid DB overload + return true if setting('defanged_admin') eq 'false_admin'; + + my $happy = false; try { schema('netdisco')->txn_do(sub { schema('netdisco')->resultset('Admin')->populate([