Commit 5a53e8b3c7fa2b6d43f312400c9b2ebaa498fe60

Authored by daniel@ruoso.com
1 parent ceff01ed
Exists in master

evita a busca constante de categorias no emissor de senhas, busca apenas uma vez.

git-svn-id: http://svn.softwarepublico.gov.br/svn/sistemadeatendimento/sistema/trunk@32 63db2ce5-8a6c-0410-abb9-a418dd412890
Showing 1 changed file with 2 additions and 1 deletions   Show diff stats
Fila-Senha/lib/Fila/Senha/Model/Emissor.pm
@@ -37,11 +37,12 @@ sub bloquear { @@ -37,11 +37,12 @@ sub bloquear {
37 } 37 }
38 } 38 }
39 39
  40 +my $cats;
40 sub abrir { 41 sub abrir {
41 my $self = shift; 42 my $self = shift;
42 43
43 warn 'Buscando categorias..'; 44 warn 'Buscando categorias..';
44 - my $cats = Fila::Senha->model('SOAP::Senha')->listar_categorias 45 + $cats ||= Fila::Senha->model('SOAP::Senha')->listar_categorias
45 ({ local => {} }); 46 ({ local => {} });
46 47
47 unless ($cats) { 48 unless ($cats) {