Skip to content

Commit

Permalink
Merge pull request #849 from MetPX/plugin_fixes_from_ddsr_dev_volume_1
Browse files Browse the repository at this point in the history
plugin fixes from ddsr dev work...
  • Loading branch information
andreleblanc11 authored Dec 1, 2023
2 parents dc3d498 + 86a4af2 commit 3ec6842
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sarracenia/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2064,7 +2064,7 @@ def sundew_matchPattern(self, BN, EN, BP, keywd, defval):

return defval

def variableExpansion(self, cdir, message=None ):
def variableExpansion(self, cdir, message=None ) -> str:
"""
replace substitution patterns, variable substitutions as described in
https://metpx.github.io/sarracenia/Reference/sr3_options.7.html#variables
Expand Down
2 changes: 1 addition & 1 deletion sarracenia/flowcb/poll/airnow.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def poll(self):
logger.info(last_poll)

fakeStat = paramiko.SFTPAttributes()
fakeStat.st_size = resp.headers['content-length']
fakeStat.st_size = int(resp.headers['content-length'])

# convert datetime to numeric timestamp from beginning of POSIX epoch.
fakeStat.st_mtime = mtime.timestamp()
Expand Down
1 change: 1 addition & 0 deletions sarracenia/flowcb/scheduled/wiski.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ def gather(self): # placeholder
then = now - self.ts_length

logger.info( f"stations: {k.get_station_list().station_id} " )
directory=self.o.variableExpansion( self.o.directory )

for station_id in k.get_station_list().station_id:

Expand Down
8 changes: 4 additions & 4 deletions sarracenia/sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2438,8 +2438,8 @@ def status(self):
txCumulativeFileRate += transferTxFileRate
txCumulativeDataRate += transferTxByteRate

rxCumulativeMessageByteRate += msgRate
rxCumulativeMessageRate += byteRate
rxCumulativeMessageByteRate += byteRate
rxCumulativeMessageRate += msgRate



Expand Down Expand Up @@ -2537,9 +2537,9 @@ def status(self):

print( '\t Pub/Sub Received: %s/s (%s/s), Sent: %s/s (%s/s) Queued: %d Retry: %d, Mean lag: %02.2fs' % (
naturalSize(rxCumulativeMessageRate).replace("B","m").replace("myte","msg"), \
naturalSize(rxCumulativeMessageRate),\
naturalSize(rxCumulativeMessageByteRate),\
naturalSize(txCumulativeMessageRate).replace("B","m").replace("myte","msg"),\
naturalSize(txCumulativeMessageRate),
naturalSize(txCumulativeMessageByteRate),
rxCumulativeMessagesQueued, rxCumulativeMessagesRetry, CumulativeMeanLag
))
print( '\t Data Received: %s/s (%s/s), Sent: %s/s (%s/s) ' % (
Expand Down

0 comments on commit 3ec6842

Please sign in to comment.