Skip to content

Commit

Permalink
fix heartbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
robkooper committed Aug 2, 2022
1 parent e9e9610 commit 21a902a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ This will change how clowder sees the extractors. If you have an extractor, and
the queue name (eiter as command line argument or environment variable) the name of the
extractor shown in clowder, will be the name of the queue.

### Fixed
- both heartbeat and nax_retry need to be converted to in, not string

### Changed
- when you set the RABBITMQ_QUEUE it will change the name of the extractor as well in the
extractor_info document. [#47](https://github.com/clowder-framework/pyclowder/issues/47)
- environment variable CLOWDER_MAX_RETRY is now MAX_RETRY

## 2.5.1 - 2022-03-04

Expand Down
6 changes: 3 additions & 3 deletions pyclowder/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ def __init__(self):
connector_default = "RabbitMQ"
if os.getenv('LOCAL_PROCESSING', "False").lower() == "true":
connector_default = "Local"
max_retry = os.getenv('CLOWDER_MAX_RETRY', 10)
heartbeat = os.getenv('HEARTBEAT', 5*60)
max_retry = int(os.getenv('MAX_RETRY', 10))
heartbeat = int(os.getenv('HEARTBEAT', 5*60))

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

Expand Down

0 comments on commit 21a902a

Please sign in to comment.