NAME
Schedule::LongSteps::Storage::DynamoDB - A DynamoDB backed longstep storage.
SYNOPSIS
my $dynamo_db = Paws->service('DynamoDB', ...); # see Paws
# You can also look in t/storage-dynamodb.t for a working example.
my $storage = Schedule::LongSteps::Storage::DynamoDB->new({ dynamo_db => $dynamo_db, table_prefix => 'my_app_longsteps' });
# Call that only once as part of your persistent data management:
$storage->vivify_table();
my $sl = Schedule::LongSteps->new({ storage => $storage, ... }, ... );
table_active
The remote DynamoDB table exists and is active.
table_exists
The remote DynamoDB table exists.
table_status
Returns the table status (or undef if the table doens't exists at all)
Usage:
if( my $status = $self->table_status() ){ .. }
Returned status can be one of those described here: https://metacpan.org/pod/Paws::DynamoDB::TableDescription
vivify_table
Vivifies the remote DynamoDB table to support this storage.
You need to call that at least once as part of your persistent data management process, or at the beginning of your application.
prepare_due_processes
See Schedule::LongSteps::Storage
create_process
See Schedule::LongSteps::Storage
find_process
See Schedule::LongSteps::Storage
destroy_table
Destroys this table. Mainly so tests don't leave some crap behind.
Use that responsibly. Which is never except in tests.
Note that this blocks until the table has effectively been deleted remotely.
update
Updates via upsert.
discard_changes
Updates what is updatable.