view release on metacpan or search on metacpan
lib/DBIx/ParseError/MySQL.pm view on Meta::CPAN
(?-x:Query execution was interrupted(?!, maximum statement execution time exceeded))|
# Initial connection failure
(?-x:Bad handshake)|
(?-x:Too many connections)|
(?-x:Host '\S+' is blocked because of many connection errors)|
(?-x:Can't get hostname for your address)|
(?-x:Can't connect to (?:local )?MySQL server)|
# Packet corruption
(?-x:Got a read error from the connection pipe)|
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Path.pm view on Meta::CPAN
no strict 'refs';
*{$field}=sub { $_[0]->{$field} }
}
{
my $locked=0;
sub _lock {
my($me, $type)=@_;
$locked++;
if($locked == 1 and $me->{hooks}{lock}) {
$me->{hooks}{lock}->($me->{dbh}, $type);
}
}
sub _unlock {
my($me, $type)=@_;
if($locked == 1) {
$me->{hooks}{unlock}->($me->{dbh}, $type) if $me->{hooks}{unlock};
}
elsif($locked == 0) {
croak "DBIx::Path: PANIC: Key won't fit in lock";
}
$locked--;
}
END {
if($locked) {
warn "DBIx::Path: WARNING: Program may have exited with lock(s) still held";
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/QueryByName/SthPool.pm view on Meta::CPAN
while (1) {
# Normally, if traffic between the client and the database
# server is interupted (cable cut, whatever), the client will
# timeout after 1min (observed on osx). But it has been
# observed on some setups (client on linux, server blocked by
# drop rule in firewall) that the client hang forever in
# execute(). The following code is a workaround:
#
# my $did_timeout = 0;
# eval {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/QuickDB/Watcher.pm view on Meta::CPAN
# until _do_watch replaces these with proper handlers.
$SIG{TERM} = 'IGNORE';
$SIG{INT} = 'IGNORE';
# Block (rather than ignore) the fast-eliminate signal across the exec. A
# blocked signal stays *pending* instead of being discarded, so a
# fast_eliminate() that races server startup -- arriving after the socket is
# up (so the caller's start() has returned) but before _do_watch has
# installed its handler -- is not lost: _do_watch unblocks it once the
# handler is in place and it fires immediately. SIG_IGN would silently drop
# it, leaving the caller's wait() to block for the full stop-grace timeout.
lib/DBIx/QuickDB/Watcher.pm view on Meta::CPAN
local $SIG{TERM} = sub { $kill = 'TERM' };
local $SIG{INT} = sub { $kill = 'INT' };
local $SIG{USR1} = sub { $kill = 'FAST_TERM' };
local $SIG{HUP} = sub { $hup = 1 };
# watch() blocked SIGUSR1 before exec so a fast_eliminate() racing startup
# would stay pending rather than be discarded. Now that the handler above is
# installed, unblock it -- any pending fast-eliminate fires here and sets
# $kill before we enter the watch loop.
POSIX::sigprocmask(POSIX::SIG_UNBLOCK(), POSIX::SigSet->new(POSIX::SIGUSR1()));
view all matches for this distribution
view release on metacpan or search on metacpan
examples/changelog/changelog-002-tables.yml view on Meta::CPAN
type: uuid
- name: msg_user
type: uuid
- default: 0
length: 1
name: locked
type: bit
- default: now()
name: last_read
type: timestamp
name: msg_session_members
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-dbix-simple-class-schema-mysql.t view on Meta::CPAN
$dbix->query('DROP TABLE IF EXISTS `groups`');
$dbix->query(<<'TAB');
CREATE TABLE IF NOT EXISTS groups(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
group_name VARCHAR(12),
`is blocked` INT,
data TEXT
) DEFAULT CHARSET=utf8 COLLATE=utf8_bin
TAB
view all matches for this distribution
view release on metacpan or search on metacpan
NoUser->throw("User is not logged in or does not exist") unless defined $session;
# get client's row
my $client = $session->Client;
# strip microseconds part
$client->filter_timestamp;
# throw exception if client is blocked
BlkUser->throw if $client->state eq 'blocked';
# set expire date
$session->expire(\"now() + interval '2 day'");
# update session
$session->update;
# get usd client's balance from client_balance
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/TextIndex.pm view on Meta::CPAN
_log("field$fno ", scalar keys %{$self->{TERM_DOCS_VINT}->[$fno]},
" distinct terms\n") if $PA;
my $s_sth;
# SQLite chokes with "database table is locked" unless s_sth
# is finished before i_sth->execute
unless ($self->{DBD_TYPE} eq 'SQLite') {
$s_sth = $self->{INDEX_DBH}->prepare(
$self->{DB}->inverted_select(
$self->{INVERTED_TABLES}->[$fno] ) );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/TryAgain.pm view on Meta::CPAN
my $dbh = DBI->connect(... dbi params.. { RootClass => "DBIx::TryAgain" } ) or die $DBI::errstr;
$dbh->try_again_algorithm('fibonacci');
$dbh->try_again_max_retries(5);
$dbh->try_again_on_messages([ qr/database is locked/i ]);
$dbh->try_again_on_prepare(1);
=head1 DESCRIPTION
This is a subclass of DBI which simply tries to execute a query
again whenever the error string matches a given set of patterns.
By default the only pattern is qr[database is locked], which is
what is returned by SQLite when the database is locked.
There is a delay between retries. Setting try_again_algorithm
to 'constant', 'linear', 'fibonacci', or 'exponential' causes
the corresponding algorithm to be used. The first five
values for these algorithsm are :
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/TxnPool.pm view on Meta::CPAN
The size of pool when a commit method will be called when feeding reaches the same size.
=item block_signals B<(Optional)>
An arrayref of signals (strings) which should be blocked in slippery places for
this I<pool>. Defaults are [ qw( TERM INT ) ]. You can change globaly this list
by setting: C<< $DBIx::TxnPool::BlockSignals = [ qw( TERM INT ALARM ... ) ] >>.
For details to see here L</"SIGNAL HANDLING">
=item max_repeated_deadlocks B<(Optional)>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Web.pod view on Meta::CPAN
=item varLoad (?lock) -> self object
C<Persistent Variables>.
Loads variables into C<-var>.
Default lock level is LOCK_SH.
File will be locked until C<end> call.
=item varLock (?lock) -> success
C<Persistent Variables>.
Locks variables file.
Default is LOCK_EX.
File will be locked until C<end> call.
=item varStore () -> self
C<Persistent Variables>.
Stores C<-var> into variables file.
LOCK_EX is used.
File will be locked until C<end> call.
=item w32adhi () -> Active Directory Host Info object
C<User Identification>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBIx/Wrapper/Changes.pm view on Meta::CPAN
=over 4
=item Fixed tests using SQLite
SQLite sometimes fails with a "database locked" error if the db
file is opened more than once. This may be because File::Temp is
locking the file.
See RT 76411 (L<https://rt.cpan.org/Public/Bug/Display.html?id=76411>)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DBM/Deep/Storage.pm view on Meta::CPAN
Take a lock usable for reading.
=item * unlock( $obj )
Releases the last lock taken. If this is the outermost lock, then the
object is actually unlocked.
=back
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
This module provides a wrapper for the DB_File module, adding locking.
When you need locking, simply use this module in place of DB_File and
add an extra argument onto the tie command specifying if the file should
be locked for reading or writing.
The alternative is to write code like:
open(LOCK, "<$db_filename.lock") or die;
flock(LOCK, LOCK_SH) or die;
Also realize that when acquiring two locks at the same time, a deadlock
situation can be caused.
You can enter a deadlock situation if two processes simultaneously try to
acquire locks on two separate databases. Each has locked only one of
the databases, and cannot continue without locking the second. Yet this
will never be freed because it is locked by the other process. If your
processes all ask for their DB files in the same order, this situation
cannot occur.
=head1 OTHER LOCKING MODULES
view all matches for this distribution
view release on metacpan or search on metacpan
get_av|5.006000|5.003007|p
getc|5.003007||Viu
get_c_backtrace|5.021001||Vi
get_c_backtrace_dump|5.021001||V
get_context|5.006000|5.006000|nu
getc_unlocked|5.003007||Viu
get_cv|5.006000|5.003007|p
get_cvn_flags|5.009005|5.003007|p
get_cvs|5.011000|5.003007|p
getcwd_sv|5.007002|5.007002|
get_db_sub|||iu
PERL_MALLOC_WRAP|5.009002|5.009002|Vn
PerlMem_calloc|5.006000||Viu
PerlMem_free|5.005000||Viu
PerlMem_free_lock|5.006000||Viu
PerlMem_get_lock|5.006000||Viu
PerlMem_is_locked|5.006000||Viu
PerlMem_malloc|5.005000||Viu
PERL_MEMORY_DEBUG_HEADER_SIZE|5.019009||Viu
PerlMemParse_calloc|5.006000||Viu
PerlMemParse_free|5.006000||Viu
PerlMemParse_free_lock|5.006000||Viu
PerlMemParse_get_lock|5.006000||Viu
PerlMemParse_is_locked|5.006000||Viu
PerlMemParse_malloc|5.006000||Viu
PerlMemParse_realloc|5.006000||Viu
PerlMem_realloc|5.005000||Viu
PerlMemShared_calloc|5.006000||Viu
PerlMemShared_free|5.006000||Viu
PerlMemShared_free_lock|5.006000||Viu
PerlMemShared_get_lock|5.006000||Viu
PerlMemShared_is_locked|5.006000||Viu
PerlMemShared_malloc|5.006000||Viu
PerlMemShared_realloc|5.006000||Viu
PERL_MG_UFUNC|5.007001||Viu
Perl_modf|5.006000|5.006000|n
PERL_MULTICONCAT_HEADER_SIZE|5.027006||Viu
putc|5.003007||Viu
put_charclass_bitmap_innards|5.021004||Viu
put_charclass_bitmap_innards_common|5.023008||Viu
put_charclass_bitmap_innards_invlist|5.023008||Viu
put_code_point|5.021004||Viu
putc_unlocked|5.003007||Viu
putenv|5.005000||Viu
put_range|5.019009||Viu
putw|5.003007||Viu
pv_display|5.006000|5.003007|p
pv_escape|5.009004|5.003007|p
view all matches for this distribution
view release on metacpan or search on metacpan
doc/rfc3921-notes.txt view on Meta::CPAN
Upon receiving initial presence from the user, the contact's server
MUST deliver the user's presence stanza to the full JIDs
(<contact@example.org/resource>) associated with all of the contact's
available resources, but only if the user is in the contact's roster
with a subscription state of "to" or "both" and the contact has not
blocked inbound presence notifications from the user's bare or full
JID (as defined under Blocking Inbound Presence Notifications
(Section 10.10)).
If the user's server receives a presence stanza of type "error" in
response to the initial presence that it sent to a contact on behalf
doc/rfc3921-notes.txt view on Meta::CPAN
Saint-Andre Standards Track [Page 17]
RFC 3921 XMPP IM October 2004
has not blocked outbound presence notifications, and (3) from whom
the server has not received a presence error during the user's
session (as well as to any of the user's other available resources).
If the presence stanza has a 'type' attribute set to a value of
"unavailable", the user's server MUST broadcast the full XML of that
doc/rfc3921-notes.txt view on Meta::CPAN
resource may become unavailable unexpectedly or may be timed out by
the server. If one of the user's resources becomes unavailable for
any reason (either gracefully or ungracefully), the user's server
MUST broadcast unavailable presence to all contacts (1) that are in
the user's roster with a subscription type of "from" or "both", (2)
to whom the user has not blocked outbound presence, and (3) from whom
the server has not received a presence error during the user's
session; the user's server MUST also send that unavailable presence
stanza to any of the user's other available resources, as well as to
any entities to which the user has sent directed presence during the
user's session for that resource (if the user has not yet sent
doc/rfc3921-notes.txt view on Meta::CPAN
values, the server MUST return to the client a <bad-request/> stanza
error.)
The <item/> element MAY contain one or more child elements that
enable an entity to specify more granular control over which kinds of
stanzas are to be blocked (i.e., rather than blocking all stanzas).
The allowable child elements are:
o <message/> -- blocks incoming message stanzas
o <iq/> -- blocks incoming IQ stanzas
o <presence-in/> -- blocks incoming presence notifications
doc/rfc3921-notes.txt view on Meta::CPAN
As a result of creating and applying the foregoing list, the user
will not receive any communications from, nor send any stanzas to,
any other users.
10.14. Blocked Entity Attempts to Communicate with User
If a blocked entity attempts to send message or presence stanzas to
the user, the user's server SHOULD silently drop the stanza and MUST
NOT return an error to the sending entity.
doc/rfc3921-notes.txt view on Meta::CPAN
Saint-Andre Standards Track [Page 83]
RFC 3921 XMPP IM October 2004
If a blocked entity attempts to send an IQ stanza of type "get" or
"set" to the user, the user's server MUST return to the sending
entity a <service-unavailable/> stanza error, since this is the
standard error code sent from a client that does not understand the
namespace of an IQ get or set. IQ stanzas of other types SHOULD be
silently dropped by the server.
Example: Blocked entity attempts to send IQ get:
<iq type='get'
to='romeo@example.net'
from='tybalt@example.com/pda'
id='probing1'>
<query xmlns='jabber:iq:version'/>
</iq>
Example: Server returns error to blocked entity:
<iq type='error'
from='romeo@example.net'
to='tybalt@example.com/pda'
id='probing1'>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DLM/Client.pm view on Meta::CPAN
if ( DLM::Client::lock_resource( 'LOCK_NAME', LKM_EXMODE, 0, $lock_id) == 0 ){
print "Locked\n";
}
if ( DLM::Client::unlock_resource($lock_id) == 0 ) {
print "Unlocked\n";
}
=head1 DESCRIPTION
DLM::Client is a direct binding to linux distributed lock manager (DLM is part of the Linux kernel from version 2.6.19) from RedHat.
lib/DLM/Client.pm view on Meta::CPAN
0 is returned if the call completed successfully. If not, -1 is returned and $! is set to one of the
following:
EINVAL An invalid parameter was passed to the call (eg bad lock mode or flag)
ENOMEM A (kernel) memory allocation failed
EAGAIN LKF_NOQUEUE was requested and the lock could not be granted
EBUSY The lock is currently being locked or converted
EFAULT The userland buffer could not be read/written by the kernel (this indicates a library problem)
=head2 unlock_resource($lockid);
Unlocks the resource.
lib/DLM/Client.pm view on Meta::CPAN
=head3 Return codes:
0 is returned if the call completed successfully. If not, -1 is returned and errno is set to one of the
following:
EINVAL An invalid parameter was passed to the call (eg bad lock mode or flag)
EINPROGRESS The lock is already being unlocked
EBUSY The lock is currently being locked or converted
=head2 Example
my $lockid;
my $status = lock_resource("mylock", LKM_EXMODE, 0, $lockid);
view all matches for this distribution
view release on metacpan or search on metacpan
get_av|5.006000|5.003007|p
getc|5.003007||Viu
get_c_backtrace|5.021001||Vi
get_c_backtrace_dump|5.021001||V
get_context|5.006000|5.006000|nu
getc_unlocked|5.003007||Viu
get_cv|5.006000|5.003007|p
get_cvn_flags|5.009005|5.003007|p
get_cvs|5.011000|5.003007|p
getcwd_sv|5.007002|5.007002|
get_db_sub|||iu
PERL_MALLOC_WRAP|5.009002|5.009002|Vn
PerlMem_calloc|5.006000||Viu
PerlMem_free|5.005000||Viu
PerlMem_free_lock|5.006000||Viu
PerlMem_get_lock|5.006000||Viu
PerlMem_is_locked|5.006000||Viu
PerlMem_malloc|5.005000||Viu
PERL_MEMORY_DEBUG_HEADER_SIZE|5.019009||Viu
PerlMemParse_calloc|5.006000||Viu
PerlMemParse_free|5.006000||Viu
PerlMemParse_free_lock|5.006000||Viu
PerlMemParse_get_lock|5.006000||Viu
PerlMemParse_is_locked|5.006000||Viu
PerlMemParse_malloc|5.006000||Viu
PerlMemParse_realloc|5.006000||Viu
PerlMem_realloc|5.005000||Viu
PerlMemShared_calloc|5.006000||Viu
PerlMemShared_free|5.006000||Viu
PerlMemShared_free_lock|5.006000||Viu
PerlMemShared_get_lock|5.006000||Viu
PerlMemShared_is_locked|5.006000||Viu
PerlMemShared_malloc|5.006000||Viu
PerlMemShared_realloc|5.006000||Viu
PERL_MG_UFUNC|5.007001||Viu
Perl_modf|5.006000|5.006000|n
PERL_MULTICONCAT_HEADER_SIZE|5.027006||Viu
putc|5.003007||Viu
put_charclass_bitmap_innards|5.021004||Viu
put_charclass_bitmap_innards_common|5.023008||Viu
put_charclass_bitmap_innards_invlist|5.023008||Viu
put_code_point|5.021004||Viu
putc_unlocked|5.003007||Viu
putenv|5.005000||Viu
put_range|5.019009||Viu
putw|5.003007||Viu
pv_display|5.006000|5.003007|p
pv_escape|5.009004|5.003007|p
view all matches for this distribution
view release on metacpan or search on metacpan
get_av|5.006000|5.003007|p
getc|5.003007||Viu
get_c_backtrace|5.021001||Vi
get_c_backtrace_dump|5.021001||V
get_context|5.006000|5.006000|nu
getc_unlocked|5.003007||Viu
get_cv|5.006000|5.003007|p
get_cvn_flags|5.009005|5.003007|p
get_cvs|5.011000|5.003007|p
getcwd_sv|5.007002|5.007002|
get_db_sub|||iu
PERL_MALLOC_WRAP|5.009002|5.009002|Vn
PerlMem_calloc|5.006000||Viu
PerlMem_free|5.005000||Viu
PerlMem_free_lock|5.006000||Viu
PerlMem_get_lock|5.006000||Viu
PerlMem_is_locked|5.006000||Viu
PerlMem_malloc|5.005000||Viu
PERL_MEMORY_DEBUG_HEADER_SIZE|5.019009||Viu
PerlMemParse_calloc|5.006000||Viu
PerlMemParse_free|5.006000||Viu
PerlMemParse_free_lock|5.006000||Viu
PerlMemParse_get_lock|5.006000||Viu
PerlMemParse_is_locked|5.006000||Viu
PerlMemParse_malloc|5.006000||Viu
PerlMemParse_realloc|5.006000||Viu
PerlMem_realloc|5.005000||Viu
PerlMemShared_calloc|5.006000||Viu
PerlMemShared_free|5.006000||Viu
PerlMemShared_free_lock|5.006000||Viu
PerlMemShared_get_lock|5.006000||Viu
PerlMemShared_is_locked|5.006000||Viu
PerlMemShared_malloc|5.006000||Viu
PerlMemShared_realloc|5.006000||Viu
PERL_MG_UFUNC|5.007001||Viu
Perl_modf|5.006000|5.006000|n
PERL_MULTICONCAT_HEADER_SIZE|5.027006||Viu
putc|5.003007||Viu
put_charclass_bitmap_innards|5.021004||Viu
put_charclass_bitmap_innards_common|5.023008||Viu
put_charclass_bitmap_innards_invlist|5.023008||Viu
put_code_point|5.021004||Viu
putc_unlocked|5.003007||Viu
putenv|5.005000||Viu
put_range|5.019009||Viu
putw|5.003007||Viu
pv_display|5.006000|5.003007|p
pv_escape|5.009004|5.003007|p
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DNS/BL/cmds/connect/db.pm view on Meta::CPAN
=head1 DESCRIPTION
This module implements the connection to a DB backend where C<DNS::BL>
data will be stored. On each call to this class' methods, a hash will
be C<tie()>d and then C<untie()>d. This guarantees that the underlying
DB structure will be unlocked and available for other commands that
may, for instance, replace or manipulate the hash "from under us".
The following methods are implemented by this module:
=over
view all matches for this distribution
view release on metacpan or search on metacpan
easyxs/ppport.h view on Meta::CPAN
get_av|5.006000|5.003007|p
getc|5.003007||Viu
get_c_backtrace|5.021001||Vi
get_c_backtrace_dump|5.021001||V
get_context|5.006000|5.006000|nu
getc_unlocked|5.003007||Viu
get_cv|5.006000|5.003007|p
get_cvn_flags|5.009005|5.003007|p
get_cvs|5.011000|5.003007|p
getcwd_sv|5.007002|5.007002|
get_db_sub|||iu
easyxs/ppport.h view on Meta::CPAN
PERL_MALLOC_WRAP|5.009002|5.009002|Vn
PerlMem_calloc|5.006000||Viu
PerlMem_free|5.005000||Viu
PerlMem_free_lock|5.006000||Viu
PerlMem_get_lock|5.006000||Viu
PerlMem_is_locked|5.006000||Viu
PerlMem_malloc|5.005000||Viu
PERL_MEMORY_DEBUG_HEADER_SIZE|5.019009||Viu
PerlMemParse_calloc|5.006000||Viu
PerlMemParse_free|5.006000||Viu
PerlMemParse_free_lock|5.006000||Viu
PerlMemParse_get_lock|5.006000||Viu
PerlMemParse_is_locked|5.006000||Viu
PerlMemParse_malloc|5.006000||Viu
PerlMemParse_realloc|5.006000||Viu
PerlMem_realloc|5.005000||Viu
PerlMemShared_calloc|5.006000||Viu
PerlMemShared_free|5.006000||Viu
PerlMemShared_free_lock|5.006000||Viu
PerlMemShared_get_lock|5.006000||Viu
PerlMemShared_is_locked|5.006000||Viu
PerlMemShared_malloc|5.006000||Viu
PerlMemShared_realloc|5.006000||Viu
PERL_MG_UFUNC|5.007001||Viu
Perl_modf|5.006000|5.006000|n
PERL_MULTICONCAT_HEADER_SIZE|5.027006||Viu
easyxs/ppport.h view on Meta::CPAN
putc|5.003007||Viu
put_charclass_bitmap_innards|5.021004||Viu
put_charclass_bitmap_innards_common|5.023008||Viu
put_charclass_bitmap_innards_invlist|5.023008||Viu
put_code_point|5.021004||Viu
putc_unlocked|5.003007||Viu
putenv|5.005000||Viu
put_range|5.019009||Viu
putw|5.003007||Viu
pv_display|5.006000|5.003007|p
pv_escape|5.009004|5.003007|p
view all matches for this distribution
view release on metacpan or search on metacpan
lib/DS/TypeSpec.pm view on Meta::CPAN
sub field_names {
my( $self, $fields ) = @_;
return keys %{$self->{fields}};
}
sub keys_locked {
my( $self, $keys_locked ) = @_;
my $result = 1;
if( $keys_locked ) {
$self->{keys_locked} = $keys_locked ? 1 : 0;
} else {
$keys_locked = $self->{keys_locked};
}
return $result;
}
sub values_readonly {
view all matches for this distribution
view release on metacpan or search on metacpan
CAB/Queue/File.pm view on Meta::CPAN
## Package DTA::CAB::Queue::File::Locked
package DTA::CAB::Queue::File::Locked;
use Fcntl qw(:flock);
our @ISA = qw(DTA::CAB::Queue::File);
sub _locked {
my $subname = shift;
my $supersub = DTA::CAB::Queue::File->can($subname);
die(__PACKAGE__, "::_locked(): no superclass subroutine for '$subname'") if (!$supersub);
return sub {
my (@rc);
flock($_[0]{queue},LOCK_EX) if ($_[0]{queue});
if (wantarray) {
@rc = $supersub->(@_);
CAB/Queue/File.pm view on Meta::CPAN
flock($_[0]{queue},LOCK_UN) if ($_[0]{queue});
return wantarray ? @rc : $rc[0];
};
}
*enq = _locked('enq');
*deq = _locked('deq');
*peek = _locked('peek');
*reset = _locked('reset');
#*close = _locked('close');
1; ##-- be happy
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
timetheese/tpl/stackoverflow_homepage.html view on Meta::CPAN
</div>
</div>
<div class="question-summary narrow" id="question-summary-15327979">
<div onclick="window.location.href='/questions/15327979/ajaxcontroltoolkit-dll-constantly-getting-locked-for-checkout'" class="cp">
<div class="votes">
<div class="mini-counts">0</div>
<div>votes</div>
</div>
<div class="status unanswered">
timetheese/tpl/stackoverflow_homepage.html view on Meta::CPAN
<div>views</div>
</div>
</div>
<div class="summary">
<h3><a href="/questions/15327979/ajaxcontroltoolkit-dll-constantly-getting-locked-for-checkout" class="question-hyperlink" title="We reference the AjaxControlToolkit.dll in our ASP.net 4.0 Web Site project. Recently we started getting an erro...
<div class="tags t-aspûnet t-visual-studio-2010 t-tfs2010">
<a href="/questions/tagged/asp.net" class="post-tag" title="show questions tagged 'asp.net'" rel="tag">asp.net</a> <a href="/questions/tagged/visual-studio-2010" class="post-tag" title="show questions tagged 'visual-studio-2010'" rel="tag...
</div>
<div class="started">
<a href="/questions/15327979/ajaxcontroltoolkit-dll-constantly-getting-locked-for-checkout" class="started-link"><span title="2013-03-10 21:38:06Z" class="relativetime">14m ago</span></a>
<a href="/users/1624069/frank-thomas">Frank Thomas</a> <span class="reputation-score" title="reputation score" dir="ltr">808</span>
</div>
</div>
</div>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Daemon/Generic.pm view on Meta::CPAN
print "Configuration looks okay\n" if $do eq 'check';
my $pidfile = $self->{gd_pidfile};
my $killed = 0;
my $locked = 0;
if (-e $pidfile) {
if ($locked = lock($pidfile, undef, 'nonblocking')) {
# old process is dead
if ($do eq 'status') {
print "$self->{gd_progname} dead\n";
exit 1;
}
lib/Daemon/Generic.pm view on Meta::CPAN
my $oldpid = read_file($pidfile);
chomp($oldpid);
if ($oldpid) {
if ($do eq 'stop' or $do eq 'restart') {
$killed = $self->gd_kill($oldpid);
$locked = lock($pidfile);
if ($do eq 'stop') {
unlink($pidfile);
exit;
}
} elsif ($do eq 'reload') {
lib/Daemon/Generic.pm view on Meta::CPAN
} elsif ($do eq 'start' || $do eq 'debug') {
print "\u$self->{gd_progname} is already running (pid $oldpid)\n";
exit; # according to LSB, this is no error
}
} else {
$self->gd_error("Pid file $pidfile is invalid but locked, exiting\n");
}
}
} else {
$locked = lock($pidfile, undef, 'nonblocking')
or die "Could not lock pid file $pidfile: $!";
}
if ($do eq 'reload' || $do eq 'stop' || $do eq 'check' || ($do eq 'restart' && ! $killed)) {
print "No $self->{gd_progname} running\n";
lib/Daemon/Generic.pm view on Meta::CPAN
$self->gd_check($pidfile);
exit
}
unless ($do eq 'reload' || $do eq 'restart' || $do eq 'start' || $do eq 'debug') {
$self->gd_other_cmd($do, $locked);
}
unless ($self->{gd_foreground} || $do eq 'debug') {
$self->gd_daemonize;
}
$locked or lock($pidfile, undef, 'nonblocking')
or die "Could not lock PID file $pidfile: $!";
write_file($pidfile, "$$\n");
print STDERR "Starting up...\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Daemon/Shutdown/Monitor/smbstatus.pm view on Meta::CPAN
Monitor samba file locks
=head1 DESCRIPTION
Uses C<smbstatus> to look for locked files every "loop_sleep". If no files are locked,
the flag "trigger_pending" is set. If a further "trigger_time" seconds
pass and all disks are still in a spun down state, the trigger is sent back to the parent
process (return 1).
=head1 METHODS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Daemonise/Plugin/JobQueue.pm view on Meta::CPAN
lazy => 1,
default => sub { 1 },
);
has 'job_locked' => (
is => 'rw',
isa => 'Bool',
default => sub { 0 },
);
lib/Daemonise/Plugin/JobQueue.pm view on Meta::CPAN
}
}
my $wrapper = sub {
# reset job_locked attribute to unlocked to start with
$self->job_locked(0);
# get the next message from the queue (includes locking)
my $msg = $self->dequeue;
# error if message was empty or not a hashref
lib/Daemonise/Plugin/JobQueue.pm view on Meta::CPAN
before 'stop' => sub {
my ($self) = @_;
if (exists $self->job->{message} and $self->job_locked) {
$self->unlock_job($self->job->{message});
}
return;
};
lib/Daemonise/Plugin/JobQueue.pm view on Meta::CPAN
$msg->{meta}->{$key} = $self->job->{message}->{meta}->{$key}
if exists $self->job->{message}->{meta}->{$key};
}
}
$self->unlock_job($msg) if $self->job_locked;
return $self->$orig($queue, $msg, $reply_queue, $exchange);
};
lib/Daemonise/Plugin/JobQueue.pm view on Meta::CPAN
and exists $msg->{meta}->{wait_for}
and not $self->wants_reply);
# log worker and update job if we have to
my $status = delete $msg->{status};
if ($self->log_worker_enabled and $self->job_locked) {
$self->log_worker($msg);
$self->update_job($msg, $status);
}
$self->unlock_job($msg) if $self->job_locked;
# reply if needed and wanted
$self->queue($self->reply_queue, $msg) if $self->wants_reply;
}
lib/Daemonise/Plugin/JobQueue.pm view on Meta::CPAN
my $success = $self->$mode($key, $value);
# return error to prevent any further processing in around 'start' wrapper
if ($mode eq 'lock') {
if ($success) {
$self->job_locked(1);
return 1;
}
else {
# we need to take into account that KT may be slow
# replicating so we need a way to re-try here once after
# a set timeout.
sleep($self->jobqueue_sync_delay);
if ($self->$mode($key, $value)) {
$self->job_locked(1);
return 1;
}
$msg->{error} = "job locked by different worker process";
$self->job_locked(0);
return;
}
}
else {
$self->job_locked(0);
return 1;
}
}
return 1;
lib/Daemonise/Plugin/JobQueue.pm view on Meta::CPAN
=head2 item_key
=head2 log_worker_enabled
=head2 job_locked
=head2 jobqueue_sync_delay
=head1 SUBROUTINES/METHODS provided
lib/Daemonise/Plugin/JobQueue.pm view on Meta::CPAN
unlock job before we get terminated
=head2 queue
pass on some meta information if needed (user, account, session).
unlock job ID before sending it off unless it's already unlocked or locking failed.
=head2 dequeue
store rabbitMQ message in job attribute after receiving.
try to lock job ID if applicable
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Daje/Database/Languages.pm view on Meta::CPAN
modby character varying COLLATE pg_catalog."default" NOT NULL DEFAULT 'System'::character varying,
moddatetime timestamp without time zone NOT NULL DEFAULT now(),
languages_lan_fkey BIGINT NOT NULL, --
languages_translation_keys_fkey BIGINT NOT NULL, --
translation VARCHAR NOT NULL , -- Translation to selected language
locked BOOLEAN NOT NULL DEFAULT false , -- Translation locked for automatic updates
CONSTRAINT languages_translations_pkey PRIMARY KEY (languages_translations_pkey)
);
CREATE TABLE IF NOT EXISTS languages_lan --
(
lib/Daje/Database/Languages.pm view on Meta::CPAN
FROM languages_types;
CREATE OR REPLACE VIEW v_languages_translations AS --
SELECT languages_translations_pkey, editnum, insby, insdatetime, modby, moddatetime,languages_lan_fkey,
languages_translation_keys_fkey,
translation,
locked
FROM languages_translations;
CREATE OR REPLACE VIEW v_languages_lan AS --
SELECT languages_lan_pkey, editnum, insby, insdatetime, modby, moddatetime, language,
browser_code,
iso_code
lib/Daje/Database/Languages.pm view on Meta::CPAN
CREATE OR REPLACE VIEW v_languages_types_list AS --
SELECT languages_types_pkey, editnum, insby, insdatetime, modby, moddatetime, type FROM languages_types;
CREATE OR REPLACE VIEW v_languages_translations_list AS --
SELECT languages_translations_pkey, editnum, insby, insdatetime, modby, moddatetime, (SELECT iso_code FROM languages_lan WHERE languages_lan_pkey = languages_lan_fkey) as languages_lan_iso_code,languages_lan_fkey,languages_translation_keys_fk...
CREATE OR REPLACE VIEW v_languages_lan_list AS --
SELECT languages_lan_pkey, editnum, insby, insdatetime, modby, moddatetime, language, browser_code, iso_code FROM languages_lan;
CREATE OR REPLACE VIEW v_languages_translation_keys_list AS --
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Daje/Database/Model/Super/ToolsVersion.pm view on Meta::CPAN
package Daje::Database::Model::Super::ToolsVersion;
use Mojo::Base 'Daje::Database::Model::Super::Common::Base', -base, -signatures, -async_await;;
use Data::Dumper;
has 'fields' => "tools_version_pkey, editnum, insby, insdatetime, modby, moddatetime, tools_projects_fkey, version, locked, name";
has 'primary_key_name' => "tools_version_pkey";
has 'table_name' => "tools_version";
sub insert($self, $data) {
view all matches for this distribution
view release on metacpan or search on metacpan
# {
# 'payload' => {
# "tools_version_pkey" => 0,
# "tools_projects_fkey" => 1,
# "version" => 1,
# "locked" => 0,
# "name" => "",
# "workflow_fkey" => 0,
# },
# 'workflow' => {
# 'workflow' => 'tools_generate_sql',
view all matches for this distribution