Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fiat Tux
Hat softwares
Lutim
Commits
cfab86c4
Commit
cfab86c4
authored
Mar 17, 2018
by
Luc Didry
Browse files
Move some tasks to recurring instead of being in after_dispatch hook
parent
fb562dd9
Changes
3
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
cfab86c4
...
...
@@ -2,6 +2,7 @@ Revision history for Lutim
????? ??????????
- PostgreSQL performance improvments
- Move some tasks to recurring instead of being in after_dispatch hook
0.9.6 2018-03-12
- Update translations
...
...
lib/Lutim.pm
View file @
cfab86c4
# vim:set sw=4 ts=4 sts=4 ft=perl expandtab:
package
Lutim
;
use
Mojo::
Base
'
Mojolicious
';
use
Mojo::
IOLoop
;
use
Lutim::DB::
Image
;
use
vars
qw($im_loaded)
;
...
...
@@ -131,16 +132,16 @@ sub startup {
}
);
$self
->
hook
(
after_dispatch
=>
sub
{
my
$c
=
shift
;
$c
->
provisioning
();
# Recurrent tasks
Mojo::
IOLoop
->
recurring
(
5
=>
sub
{
my
$loop
=
shift
;
# Purge expired anti-flood protection
my
$wait_for_it
=
$c
->
app
->
{
wait_for_it
};
delete
@
{
$wait_for_it
}{
grep
{
time
-
$wait_for_it
->
{
$_
}
>
$c
->
config
->
{
anti_flood_delay
}
}
keys
%
{
$wait_for_it
}}
if
(
defined
(
$wait_for_it
));
}
);
$self
->
provisioning
();
# Purge expired anti-flood protection
my
$wait_for_it
=
$self
->
{
wait_for_it
};
delete
@
{
$wait_for_it
}{
grep
{
time
-
$wait_for_it
->
{
$_
}
>
$self
->
config
->
{
anti_flood_delay
}
}
keys
%
{
$wait_for_it
}}
if
(
defined
(
$wait_for_it
));
});
$self
->
defaults
(
layout
=>
'
default
');
...
...
themes/default/lib/Lutim/I18N/lutim.pot
View file @
cfab86c4
...
...
@@ -32,11 +32,11 @@ msgstr ""
msgid "-or-"
msgstr ""
#: lib/Lutim.pm:18
7
lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
#: lib/Lutim.pm:18
8
lib/Lutim/Command/cron/stats.pm:151 lib/Lutim/Command/cron/stats.pm:162 lib/Lutim/Command/cron/stats.pm:179 themes/default/templates/index.html.ep:5 themes/default/templates/raw.html.ep:10 themes/default/templates/raw.html.ep:21 themes/default/templates/raw.html.ep:38
msgid "1 year"
msgstr ""
#: lib/Lutim.pm:18
6
lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/lutim.js.ep:151 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
#: lib/Lutim.pm:18
7
lib/Lutim/Command/cron/stats.pm:148 lib/Lutim/Command/cron/stats.pm:159 lib/Lutim/Command/cron/stats.pm:176 themes/default/templates/index.html.ep:4 themes/default/templates/partial/for_my_delay.html.ep:13 themes/default/templates/partial/lutim.js.ep:151 themes/default/templates/raw.html.ep:18 themes/default/templates/raw.html.ep:35 themes/default/templates/raw.html.ep:7
msgid "24 hours"
msgstr ""
...
...
@@ -495,7 +495,7 @@ msgstr ""
msgid "core developer"
msgstr ""
#: lib/Lutim.pm:18
5
lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
#: lib/Lutim.pm:18
6
lib/Lutim/Command/cron/stats.pm:147 lib/Lutim/Command/cron/stats.pm:158 lib/Lutim/Command/cron/stats.pm:175 themes/default/templates/index.html.ep:3 themes/default/templates/raw.html.ep:17 themes/default/templates/raw.html.ep:34 themes/default/templates/raw.html.ep:6
msgid "no time limit"
msgstr ""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment