Skip to content

Commit

Permalink
SCTASK0080918 updated to use url also
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangho Kim committed Feb 3, 2022
1 parent cb48a98 commit d610064
Showing 1 changed file with 19 additions and 9 deletions.
28 changes: 19 additions & 9 deletions lib/GRNOC/TSDS/Aggregate/Aggregator/Worker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,26 @@ sub start {

$self->_set_json( $json );

# create websvc object
my $websvc = GRNOC::WebService::Client->new( uid => $self->config->get( '/config/worker/tsds/username' ),
passwd => $self->config->get( '/config/worker/tsds/password' ),
realm => $self->config->get( '/config/worker/tsds/realm' ),
service_cache_file => SERVICE_CACHE_FILE,
cookieJar => COOKIES_FILE,
usePost => 1 );

$websvc->set_service_identifier( 'urn:publicid:IDN+grnoc.iu.edu:' . $self->config->get( '/config/worker/tsds/cloud' ) . ':TSDS:1:Query' );

# create websvc object
my $websvc;
if ( not $self->config->get( '/config/worker/tsds/url' ) ) {
$websvc = GRNOC::WebService::Client->new( uid => $self->config->get( '/config/worker/tsds/username' ),
passwd => $self->config->get( '/config/worker/tsds/password' ),
realm => $self->config->get( '/config/worker/tsds/realm' ),
service_cache_file => SERVICE_CACHE_FILE,
cookieJar => COOKIES_FILE,
usePost => 1 );

$websvc->set_service_identifier( 'urn:publicid:IDN+grnoc.iu.edu:' . $self->config->get( '/config/worker/tsds/cloud' ) . ':TSDS:1:Query' );
}else{
$websvc = GRNOC::WebService::Client->new( uid => $self->config->get( '/config/worker/tsds/username' ),
passwd => $self->config->get( '/config/worker/tsds/password' ),
realm => $self->config->get( '/config/worker/tsds/realm' ),
url => $self->config->get( '/config/worker/tsds/url' ),
cookieJar => COOKIES_FILE,
usePost => 1 );
}
$self->_set_websvc( $websvc );

# connect to rabbit queues
Expand Down

0 comments on commit d610064

Please sign in to comment.