|
9 | 9 | from taskqueue import TaskQueue
|
10 | 10 |
|
11 | 11 | from igneous import EmptyVolumeException
|
12 |
| -from igneous import logger |
| 12 | +#from igneous import logger |
13 | 13 |
|
14 | 14 | from igneous.secrets import QUEUE_NAME, QUEUE_TYPE, SQS_URL, LEASE_SECONDS
|
15 | 15 |
|
@@ -78,16 +78,19 @@ def execute(tag, queue, server, qurl, loop):
|
78 | 78 | task.execute()
|
79 | 79 | print("delete task in queue...")
|
80 | 80 | tq.delete(task)
|
81 |
| - logger.log('INFO', task , "succesfully executed") |
| 81 | + #logger.log('INFO', task , "succesfully executed") |
| 82 | + print("successfully executed") |
82 | 83 | tries = 0
|
83 | 84 | except TaskQueue.QueueEmpty:
|
84 | 85 | time.sleep(random_exponential_window_backoff(tries))
|
85 | 86 | continue
|
86 | 87 | except EmptyVolumeException:
|
87 |
| - logger.log('WARNING', task, "raised an EmptyVolumeException") |
88 |
| - tq.delete(task) |
| 88 | + #logger.log('WARNING', task, "raised an EmptyVolumeException") |
| 89 | + print('raised an EmptyVolumeException') |
| 90 | + raise |
| 91 | + #tq.delete(task) |
89 | 92 | except Exception as e:
|
90 |
| - logger.log('ERROR', task, "raised {}\n {}".format(e , traceback.format_exc())) |
| 93 | + #logger.log('ERROR', task, "raised {}\n {}".format(e , traceback.format_exc())) |
91 | 94 | raise #this will restart the container in kubernetes
|
92 | 95 | if (not loop) or (not LOOP):
|
93 | 96 | print("not in loop mode, will break the loop and exit")
|
|
0 commit comments