diff options
author | ivan <ivan> | 2010-06-23 23:06:08 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-06-23 23:06:08 +0000 |
commit | af822b448b22bc49c1f149a54ba90f643faddaf8 (patch) | |
tree | e1a173607ef76c3b0b8da5386f8313a9cbacd940 | |
parent | ae28650dd7206eaa00ba14f440e5a37322a971b2 (diff) |
fix domain renames, RT#7083
-rw-r--r-- | FS/FS/part_export/communigate_pro.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/FS/FS/part_export/communigate_pro.pm b/FS/FS/part_export/communigate_pro.pm index edfd4b18e..42f562c2b 100644 --- a/FS/FS/part_export/communigate_pro.pm +++ b/FS/FS/part_export/communigate_pro.pm @@ -383,12 +383,16 @@ sub _export_replace_svc_acct { sub _export_replace_svc_domain { my( $self, $new, $old ) = (shift, shift, shift); + #let's just do the rename part realtime rather than trying to queue + #w/dependencies. we don't want FS winding up out-of-sync with the wrong + #username and a queued job anyway. right?? if ( $old->domain ne $new->domain ) { - my $error = $self->communigate_pro_queue( $new->svcnum, 'RenameDomain', - $old->domain, $new->domain, - ); - return $error if $error; + eval { $self->communigate_pro_runcommand( + 'RenameDomain', $old->domain, $new->domain, + ) }; + return $@ if $@; } + my %settings = (); $settings{'AccountsLimit'} = $new->max_accounts if $old->max_accounts ne $new->max_accounts; |