Skip to content

Commit 21a902a

Browse files
committed
fix heartbeat
1 parent e9e9610 commit 21a902a

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ This will change how clowder sees the extractors. If you have an extractor, and
1010
the queue name (eiter as command line argument or environment variable) the name of the
1111
extractor shown in clowder, will be the name of the queue.
1212

13+
### Fixed
14+
- both heartbeat and nax_retry need to be converted to in, not string
15+
1316
### Changed
1417
- when you set the RABBITMQ_QUEUE it will change the name of the extractor as well in the
1518
extractor_info document. [#47](https://github.com/clowder-framework/pyclowder/issues/47)
19+
- environment variable CLOWDER_MAX_RETRY is now MAX_RETRY
1620

1721
## 2.5.1 - 2022-03-04
1822

pyclowder/extractors.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def __init__(self):
7373
connector_default = "RabbitMQ"
7474
if os.getenv('LOCAL_PROCESSING', "False").lower() == "true":
7575
connector_default = "Local"
76-
max_retry = os.getenv('CLOWDER_MAX_RETRY', 10)
77-
heartbeat = os.getenv('HEARTBEAT', 5*60)
76+
max_retry = int(os.getenv('MAX_RETRY', 10))
77+
heartbeat = int(os.getenv('HEARTBEAT', 5*60))
7878

7979
# create the actual extractor
8080
self.parser = argparse.ArgumentParser(description=self.extractor_info['description'])
@@ -111,7 +111,7 @@ def __init__(self):
111111
self.parser.add_argument('--no-bind', dest="nobind", action='store_true',
112112
help='instance will bind itself to RabbitMQ by name but NOT file type')
113113
self.parser.add_argument('--max-retry', dest='max_retry', default=max_retry,
114-
help='Maximum number of retries if an error happens in the extractor')
114+
help='Maximum number of retries if an error happens in the extractor (default=%d)' % max_retry)
115115
self.parser.add_argument('--heartbeat', dest='heartbeat', default=heartbeat,
116116
help='Time in seconds between extractor heartbeats (default=%d)' % heartbeat)
117117

0 commit comments

Comments
 (0)