|
|
@ -366,8 +366,9 @@ helper has_joined => sub { |
|
|
|
helper delete_participants => sub { |
|
|
|
helper delete_participants => sub { |
|
|
|
my $self = shift; |
|
|
|
my $self = shift; |
|
|
|
$self->app->log->debug('Removing inactive participants from the database'); |
|
|
|
$self->app->log->debug('Removing inactive participants from the database'); |
|
|
|
|
|
|
|
my $timeout = time()-600; |
|
|
|
my $sth = eval { |
|
|
|
my $sth = eval { |
|
|
|
$self->db->prepare("DELETE FROM `participants` WHERE (`activity_timestamp` < 600 OR `activity_timestamp` IS NULL);") |
|
|
|
$self->db->prepare("DELETE FROM `participants` WHERE (`activity_timestamp` < $timeout OR `activity_timestamp` IS NULL);") |
|
|
|
} || return undef; |
|
|
|
} || return undef; |
|
|
|
$sth->execute() || return undef; |
|
|
|
$sth->execute() || return undef; |
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|