[freeside-commits] freeside/FS/bin freeside-selfservice-server, 1.22, 1.23
Jeff Finucane,420,,
jeff at wavetail.420.am
Wed May 27 00:50:42 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/bin
In directory wavetail.420.am:/tmp/cvs-serv12160/FS/bin
Modified Files:
freeside-selfservice-server
Log Message:
bulk provisioning via ftp and SOAP #5202
Index: freeside-selfservice-server
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/bin/freeside-selfservice-server,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- freeside-selfservice-server 1 May 2007 19:57:39 -0000 1.22
+++ freeside-selfservice-server 27 May 2009 07:50:40 -0000 1.23
@@ -15,9 +15,11 @@
use FS::UID qw(adminsuidsetup forksuidsetup);
use FS::ClientAPI;
use FS::ClientAPI_SessionCache;
+use FS::Record qw( qsearch qsearchs );
use FS::Conf;
use FS::cust_svc;
+use FS::agent;
$FREESIDE_LOG = "%%%FREESIDE_LOG%%%";
$FREESIDE_LOCK = "%%%FREESIDE_LOCK%%%";
@@ -97,7 +99,28 @@
if ( $keepalives && $keepalive_count++ > 10 ) {
$keepalive_count = 0;
lock_write;
+
nstore_fd( { _token => '_keepalive' }, $writer );
+ foreach my $agent ( qsearch( 'agent', { disabled => '' } ) ) {
+ my $config = qsearchs( 'conf', { name => 'selfservice-bulk_ftp_dir',
+ agentnum => $agent->agentnum,
+ } )
+ or next;
+
+ my $session =
+ FS::ClientAPI->dispatch( 'Agent/agent_login',
+ { username => $agent->username,
+ password => $agent->_password,
+ }
+ );
+
+ nstore_fd( { _token => '_ftp_scan',
+ dir => $config->value,
+ session_id => $session->{session_id},
+ },
+ $writer
+ );
+ }
unlock_write;
}
next;
More information about the freeside-commits
mailing list