Skip to content

Commit

Permalink
This commit includes some requriements for clog and try/except block …
Browse files Browse the repository at this point in the history
…for handle_events
  • Loading branch information
EmanElsaban committed Jan 16, 2024
1 parent 951fcc8 commit bd13bab
Show file tree
Hide file tree
Showing 5 changed files with 162 additions and 141 deletions.
10 changes: 0 additions & 10 deletions bin/trond
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import argparse
import logging
import os
import queue
import traceback

import pkg_resources
Expand All @@ -22,14 +21,6 @@ DEFAULT_LOCKFILE = "tron.lock"
DEFAULT_LOCKPATH = "/var/run/" + DEFAULT_LOCKFILE


def patch_queue() -> None:
# this is absolutely disgusting, but something about the locking behavior in the C version of this
# appears to be wreaking havoc on either our taskproc queues or potentially Twisted-internal queues.
# we've gone the gevent route (see gevent/gevent#1253) and monkey-patched back to the Python implementation
# (i.e., the implementation used in py36).
queue.SimpleQueue = queue._PySimpleQueue


def parse_cli():
parser = argparse.ArgumentParser()

Expand Down Expand Up @@ -178,7 +169,6 @@ def main():
args = parse_cli()

setup_environment(args)
patch_queue()
trond = trondaemon.TronDaemon(args)
trond.run()

Expand Down
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ certifi==2022.12.7
cffi==1.12.3
cfn-lint==0.24.4
chardet==3.0.4
clusterman-metrics==2.2.1 # used by tron for pre-scaling for Spark runs
constantly==15.1.0
cryptography==39.0.1
dataclasses==0.6
Expand Down Expand Up @@ -75,6 +76,7 @@ requests-oauthlib==1.2.0
responses==0.10.6
rsa==4.9
s3transfer==0.6.0
scribereader==0.14.1 # used by tron to get tronjob logs
setuptools==65.5.1
six==1.15.0
sshpubkeys==3.1.0
Expand All @@ -89,4 +91,7 @@ websocket-client==0.56.0
Werkzeug==2.2.3
wrapt==1.11.2
xmltodict==0.12.0
yelp-clog==7.0.1 # scribereader dependency
yelp-logging==4.17.0 # scribereader dependency
yelp-meteorite==2.1.1 # used by task-processing to emit metrics, clusterman-metrics dependency
zope.interface==5.1.0
Loading

0 comments on commit bd13bab

Please sign in to comment.