NAME
Schedule::LongSteps::Storage::AutoDBIx - An automatically deployed storage.
SYNOPSIS
First instanciate a storage with a subroutine returning a valid $dbh (from DBI for instance, or from your own DBIx::Class::Schema)):
my $storage = Schedule::LongSteps::Storage::AutoDBIx->new({
get_dbh => sub{ return a valid $dbh },
});
Note that this will automatically create a table named 'schedule_longsteps_process' in your database. This is not configurable for now.
Then build and use a Schedule::LongSteps object:
my $long_steps = Schedule::LongSteps->new({ storage => $storage });
...
ATTRIBUTES
- get_dbh
-
A subroutine that returns a valid $dbh (from DBI) database connection handle. Required.
- auto_deploy
-
Set that to false if you dont want this to deploy its built in schema automatically. Defaults to 1.
prepare_due_processes
See Schedule::LongSteps::Storage
create_process
See Schedule::LongSteps::Storage
find_process
See Schedule::LongSteps::Storage
deploy
Deploys this in the given dbh. Use this only ONCE if 'auto_deploy' is false.
Usage:
$this->deploy();