Added a dbSlave test to Session.t. It's kind of a hack as it sets up
a slave reference back to the original db from the config. Bug fixes for the TrashClipboard workflow activity. The dates were off, since the interval returns an epoch, and the call to Asset->new didn't have the session.
This commit is contained in:
parent
52ebd6eece
commit
ac6116b7a0
3 changed files with 34 additions and 3 deletions
|
|
@ -75,10 +75,10 @@ See WebGUI::Workflow::Activity::execute() for details.
|
|||
|
||||
sub execute {
|
||||
my $self = shift;
|
||||
my $expireDate = (time()-(86400*$self->get("trashAfter")));
|
||||
my $expireDate = (time()-$self->get("trashAfter"));
|
||||
my $sth = $self->session->db->read("select assetId,className from asset where state='clipboard' and stateChanged < ?", [$expireDate]);
|
||||
while (my ($id, $class) = $sth->array) {
|
||||
my $asset = WebGUI::Asset->new($id,$class);
|
||||
my $asset = WebGUI::Asset->new($self->session,$id,$class);
|
||||
$asset->trash;
|
||||
}
|
||||
return $self->COMPLETE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue