diff --git a/Netdisco/Changes b/Netdisco/Changes index 00821b25..d89731a8 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -3,6 +3,7 @@ [ENHANCEMENTS] * random() and LIMIT the number of daemon jobs requested from Netdisco queue + * Remove Daemon's job queue DBIC schema from user config 2.005000_002 - 2013-02-10 diff --git a/Netdisco/lib/App/Netdisco/Daemon/Queue.pm b/Netdisco/lib/App/Netdisco/Daemon/Queue.pm index d1ab9483..f5da9556 100644 --- a/Netdisco/lib/App/Netdisco/Daemon/Queue.pm +++ b/Netdisco/lib/App/Netdisco/Daemon/Queue.pm @@ -8,6 +8,17 @@ our @EXPORT = (); our @EXPORT_OK = qw/ add_jobs capacity_for take_jobs reset_jobs /; our %EXPORT_TAGS = ( all => \@EXPORT_OK ); +# static configuration for the in-memory local job queue +setting('plugins')->{DBIC}->{daemon} = { + dsn => 'dbi:SQLite:dbname=:memory:', + options => { + AutoCommit => 1, + RaiseError => 1, + sqlite_use_immediate_transaction => 1, + }, + schema_class => 'App::Netdisco::Daemon::DB', +}; + schema('daemon')->deploy; my $queue = schema('daemon')->resultset('Admin'); diff --git a/Netdisco/share/environments/development.yml b/Netdisco/share/environments/development.yml index ea7a6a85..9bd1af97 100644 --- a/Netdisco/share/environments/development.yml +++ b/Netdisco/share/environments/development.yml @@ -29,15 +29,6 @@ plugins: options: RaiseError: 1 AutoCommit: 1 - # please do not change/remove this schema unless you - # know what you are doing! - daemon: - schema_class: 'App::Netdisco::Daemon::DB' - dsn: 'dbi:SQLite:dbname=:memory:' - options: - RaiseError: 1 - AutoCommit: 1 - sqlite_use_immediate_transaction: 1 # uncomment and set to 1 to disable authentication/login no_auth: 1 diff --git a/Netdisco/share/environments/production.yml b/Netdisco/share/environments/production.yml index 71805356..81e4f52a 100644 --- a/Netdisco/share/environments/production.yml +++ b/Netdisco/share/environments/production.yml @@ -27,15 +27,6 @@ plugins: options: RaiseError: 1 AutoCommit: 1 - # please do not change/remove this schema unless you - # know what you are doing! - daemon: - schema_class: 'App::Netdisco::Daemon::DB' - dsn: 'dbi:SQLite:dbname=:memory:' - options: - RaiseError: 1 - AutoCommit: 1 - sqlite_use_immediate_transaction: 1 # uncomment and set to 1 to disable authentication/login # no_auth: 0 diff --git a/TODO b/TODO index 0639befe..3f9d9ccc 100644 --- a/TODO +++ b/TODO @@ -21,7 +21,6 @@ DAEMON * poller daemon (scheduling automatically?) - plugins for poller -* Daemon schema auto-set (not in config) * logging from daemon CORE