[freeside-commits] freeside/bin import-did-inventory,1.2,1.3

Erik Levinson levinse at wavetail.420.am
Thu May 26 14:36:22 PDT 2011


Update of /home/cvs/cvsroot/freeside/bin
In directory wavetail.420.am:/tmp/cvs-serv8601/bin

Modified Files:
	import-did-inventory 
Log Message:
DID inventory import, RT12754

Index: import-did-inventory
===================================================================
RCS file: /home/cvs/cvsroot/freeside/bin/import-did-inventory,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- import-did-inventory	21 May 2011 06:32:39 -0000	1.2
+++ import-did-inventory	26 May 2011 21:36:20 -0000	1.3
@@ -18,22 +18,23 @@
 use FS::did_vendor;
 use FS::svc_phone;
 use Data::Dumper;
+use Time::HiRes qw(usleep ualarm gettimeofday tv_interval);
 
 print "started time=".time."\n";
 
 #### SET THESE! #################################
 my $file = '/home/levinse/dids1.csv';
 my $did_vendor_id = 1; 
-my $dry = 1; 
-my $debug = 0;
-my $internal_diddb_exportnum = 2; # IMPORTANT: set this to the correct exportnum or everything will go in wrong into phone_avail
+my $dry = 0; 
+my $internal_diddb_exportnum = 1; # IMPORTANT: set this to the correct exportnum or everything will go in wrong into phone_avail
+
+# optionally set this one (probably not)
 my %custname2num = (); # MyCust => 12345,
 ################################################
 
 my $user = shift;
 adminsuidsetup $user;
 
-# oh yeah this is fun when you can't Ctrl+C me
 local $SIG{HUP} = 'IGNORE';
 local $SIG{INT} = 'IGNORE';
 local $SIG{QUIT} = 'IGNORE';
@@ -72,8 +73,9 @@
  'Portland ME' => 38860, 
 );
 my $skipto = 0; 
-my $limit = 900;
+my $limit = 0;
 my $linenum = 1;
+my $debug = 0;
 
 # cache LATA and MSA tables in one query for performance
 my @latas = qsearch('lata', {});
@@ -403,9 +405,9 @@
 
     fatal("can't insert svc_phone: $error") if $error;
 
-    #$phone_avail->svcnum($svc_phone->svcnum);
-    #$error = $phone_avail->replace;
-    #fatal("can't replace phone_avail: $error") if $error;
+    $phone_avail->svcnum($svc_phone->svcnum);
+    $error = $phone_avail->replace;
+    fatal("can't replace phone_avail: $error") if $error;
 
     '';
 }



More information about the freeside-commits mailing list