diff options
| author | jason | 2016-01-04 18:36:19 -0700 |
|---|---|---|
| committer | jason | 2016-01-04 18:36:19 -0700 |
| commit | a5766dfd9e40756ad7ae68c2a67009779abc6efb (patch) | |
| tree | 5b5f224e7b2d0e7976f2e1845fc4b80cc9a88abc | |
| parent | bd9af73ba475ea9a4184f1311f6f4cc1070a6b39 (diff) | |
| download | eventmq-a5766dfd9e40756ad7ae68c2a67009779abc6efb.tar.gz eventmq-a5766dfd9e40756ad7ae68c2a67009779abc6efb.zip | |
add headers to SCHEDULE command
| -rw-r--r-- | agenda.org | 209 | ||||
| -rw-r--r-- | docs/protocol.rst | 7 | ||||
| -rw-r--r-- | eventmq/client/messages.py | 11 |
3 files changed, 119 insertions, 108 deletions
| @@ -1,16 +1,11 @@ | |||
| 1 | * EventMQ Milestones | 1 | ** EventMQ Milestones |
| 2 | ** 0.2 [15/26] [57%] :milestone: | 2 | *** 0.2 [16/26] [61%] :milestone: |
| 3 | :PROPERTIES: | 3 | :PROPERTIES: |
| 4 | :ID: 2954195A-5456-4787-A27F-E64E3B3E84CA | 4 | :ID: 2954195A-5456-4787-A27F-E64E3B3E84CA |
| 5 | :DESCRIPTION: Add support for scheduling messages. Bonus: Add support for | 5 | :DESCRIPTION: Add support for scheduling messages. Bonus: Add support for |
| 6 | Redwood integration | 6 | Redwood integration |
| 7 | :END: | 7 | :END: |
| 8 | *** NEXT add a header field to SCHEDULE | 8 | **** TODO [#A] router MUST receive an ACK when adding a schedule to a scheduler. |
| 9 | :PROPERTIES: | ||
| 10 | :ID: 700FE422-D105-4E59-A806-35868818FAA5 | ||
| 11 | :END: | ||
| 12 | default: ensure the message is delivered with an ack | ||
| 13 | *** TODO [#A] router MUST receive an ACK when adding a schedule to a scheduler. | ||
| 14 | :PROPERTIES: | 9 | :PROPERTIES: |
| 15 | :ID: DF4440E7-58AC-4AE9-8991-F24934C0C370 | 10 | :ID: DF4440E7-58AC-4AE9-8991-F24934C0C370 |
| 16 | :CREATED: <2015-12-30 Wed 17:00> | 11 | :CREATED: <2015-12-30 Wed 17:00> |
| @@ -18,7 +13,7 @@ default: ensure the message is delivered with an ack | |||
| 18 | :LOGBOOK: | 13 | :LOGBOOK: |
| 19 | CLOCK: [2015-12-30 Wed 16:59]--[2015-12-30 Wed 17:10] => 0:11 | 14 | CLOCK: [2015-12-30 Wed 16:59]--[2015-12-30 Wed 17:10] => 0:11 |
| 20 | :END: | 15 | :END: |
| 21 | *** BUG on_receive_request scheduler infinite loop | 16 | **** BUG on_receive_request scheduler infinite loop |
| 22 | :PROPERTIES: | 17 | :PROPERTIES: |
| 23 | :ID: 8C5D596A-30B2-4EA1-A715-D3E613A19260 | 18 | :ID: 8C5D596A-30B2-4EA1-A715-D3E613A19260 |
| 24 | :END: | 19 | :END: |
| @@ -28,26 +23,26 @@ CLOCK: [2015-12-30 Wed 15:05]--[2015-12-30 Wed 15:06] => 0:01 | |||
| 28 | [2015-12-30 Wed 15:05] | 23 | [2015-12-30 Wed 15:05] |
| 29 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/router.py::self.on_receive_request(msg)]] | 24 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/router.py::self.on_receive_request(msg)]] |
| 30 | sending a SUBSCRIBE with no connected schedulers causes an infinite loop | 25 | sending a SUBSCRIBE with no connected schedulers causes an infinite loop |
| 31 | *** TODO [#B] implement the DISCONNECT frame in scheduler. | 26 | **** TODO [#B] implement the DISCONNECT frame in scheduler. |
| 32 | :PROPERTIES: | 27 | :PROPERTIES: |
| 33 | :ID: E2D631BE-4F19-45FE-B695-BEAA71D27ADB | 28 | :ID: E2D631BE-4F19-45FE-B695-BEAA71D27ADB |
| 34 | :END: | 29 | :END: |
| 35 | Without it tests can't be executed in threads | 30 | Without it tests can't be executed in threads |
| 36 | *** TODO [#B] add a waiting_messages threshold config for the broker. notify someone when the threshold is hit. | 31 | **** TODO [#B] add a waiting_messages threshold config for the broker. notify someone when the threshold is hit. |
| 37 | :PROPERTIES: | 32 | :PROPERTIES: |
| 38 | :ID: D233DFD8-67AD-4D55-B123-D75D4C898F9D | 33 | :ID: D233DFD8-67AD-4D55-B123-D75D4C898F9D |
| 39 | :END: | 34 | :END: |
| 40 | [2015-12-07 Mon 10:42] | 35 | [2015-12-07 Mon 10:42] |
| 41 | [[file:~/Code/enderlabs/mq/eventmq/router.py::#%20workers][file:~/Code/enderlabs/mq/eventmq/router.py::# | 36 | [[file:~/Code/enderlabs/mq/eventmq/router.py::#%20workers][file:~/Code/enderlabs/mq/eventmq/router.py::# |
| 42 | workers]] | 37 | workers]] |
| 43 | *** TODO [#C] the schedules for plugins like redwood need to be persistant so they can be loaded by the scheduler after crash. | 38 | **** TODO [#C] the schedules for plugins like redwood need to be persistant so they can be loaded by the scheduler after crash. |
| 44 | :PROPERTIES: | 39 | :PROPERTIES: |
| 45 | :ID: 944903B8-BF73-4F73-82E0-4EFD07613118 | 40 | :ID: 944903B8-BF73-4F73-82E0-4EFD07613118 |
| 46 | :END: | 41 | :END: |
| 47 | [2015-12-07 Mon 16:00] | 42 | [2015-12-07 Mon 16:00] |
| 48 | [[file:~/Code/enderlabs/mq/eventmq/router.py::if%20now%20-%20self._meta%5B'last_sent_heartbeat'%5D%20>%3D%20\][file:~/Code/enderlabs/mq/eventmq/router.py::if now - self._meta['last_sent_heartbeat'] >= \]] | 43 | [[file:~/Code/enderlabs/mq/eventmq/router.py::if%20now%20-%20self._meta%5B'last_sent_heartbeat'%5D%20>%3D%20\][file:~/Code/enderlabs/mq/eventmq/router.py::if now - self._meta['last_sent_heartbeat'] >= \]] |
| 49 | How would several schedulers partition the data? | 44 | How would several schedulers partition the data? |
| 50 | *** TODO [#C] There should be a way to verify the scheduled jobs are still valid in EventMQ | 45 | **** TODO [#C] There should be a way to verify the scheduled jobs are still valid in EventMQ |
| 51 | :PROPERTIES: | 46 | :PROPERTIES: |
| 52 | :ID: C783B048-777D-424B-B788-D0DEE1C86E6E | 47 | :ID: C783B048-777D-424B-B788-D0DEE1C86E6E |
| 53 | :END: | 48 | :END: |
| @@ -60,7 +55,7 @@ CLOCK: [2015-12-22 Tue 15:03]--[2015-12-22 Tue 15:06] => 0:03 | |||
| 60 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/scheduler.py]] | 55 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/scheduler.py]] |
| 61 | for example, a plugin has been disabled, but the schedule hasn't been removed | 56 | for example, a plugin has been disabled, but the schedule hasn't been removed |
| 62 | for some reason | 57 | for some reason |
| 63 | *** TODO [#C] rename the json module in jobmanager to serializer and deserializer so they can later be abstracted in to serializers that can be chosen from | 58 | **** TODO [#C] rename the json module in jobmanager to serializer and deserializer so they can later be abstracted in to serializers that can be chosen from |
| 64 | :PROPERTIES: | 59 | :PROPERTIES: |
| 65 | :ID: E5CF91A2-92B7-4343-BAA4-DBFEDD9689CA | 60 | :ID: E5CF91A2-92B7-4343-BAA4-DBFEDD9689CA |
| 66 | :END: | 61 | :END: |
| @@ -68,7 +63,7 @@ for some reason | |||
| 68 | [[file:~/Code/enderlabs/mq/eventmq/jobmanager.py::import%20json][file:~/Code/enderlabs/mq/eventmq/jobmanager.py::import json]] | 63 | [[file:~/Code/enderlabs/mq/eventmq/jobmanager.py::import%20json][file:~/Code/enderlabs/mq/eventmq/jobmanager.py::import json]] |
| 69 | This is so that different serializers can be used. msgpack should be the next | 64 | This is so that different serializers can be used. msgpack should be the next |
| 70 | supported codec. | 65 | supported codec. |
| 71 | *** TODO Remove empty queues from router | 66 | **** TODO Remove empty queues from router |
| 72 | :PROPERTIES: | 67 | :PROPERTIES: |
| 73 | :ID: 0258CB3A-6579-4AB0-BCEA-A60DCEF541B1 | 68 | :ID: 0258CB3A-6579-4AB0-BCEA-A60DCEF541B1 |
| 74 | :END: | 69 | :END: |
| @@ -80,54 +75,62 @@ supported codec. | |||
| 80 | 'e16f59c1-9a7e-4d8b-9118-fe7dd9cd66cb'], | 75 | 'e16f59c1-9a7e-4d8b-9118-fe7dd9cd66cb'], |
| 81 | 'worker': | 76 | 'worker': |
| 82 | []} | 77 | []} |
| 83 | *** TODO [#C] REFACTOR job manager's received_disconnect logic. It's everywhere. | 78 | **** TODO [#C] REFACTOR job manager's received_disconnect logic. It's everywhere. |
| 84 | :PROPERTIES: | 79 | :PROPERTIES: |
| 85 | :ID: F917AD57-A87E-4059-97D6-E7F572E8C569 | 80 | :ID: F917AD57-A87E-4059-97D6-E7F572E8C569 |
| 86 | :END: | 81 | :END: |
| 87 | [2015-12-30 Wed 21:18] | 82 | [2015-12-30 Wed 21:18] |
| 88 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/jobmanager.py]] | 83 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/jobmanager.py]] |
| 89 | *** TODO make sure shutting down the box still works | 84 | **** TODO make sure shutting down the box still works |
| 90 | *** DONE [#B] pause the scheduler when the broker is missing | 85 | **** DONE add a header field to SCHEDULE |
| 86 | :PROPERTIES: | ||
| 87 | :ID: 700FE422-D105-4E59-A806-35868818FAA5 | ||
| 88 | :END: | ||
| 89 | :LOGBOOK: | ||
| 90 | CLOCK: [2016-01-04 Mon 18:10]--[2016-01-04 Mon 18:35] => 0:25 | ||
| 91 | :END: | ||
| 92 | default: ensure the message is delivered | ||
| 93 | **** DONE [#B] pause the scheduler when the broker is missing | ||
| 91 | :PROPERTIES: | 94 | :PROPERTIES: |
| 92 | :ID: FD0C4F74-4327-4DA3-B75E-367FB47E4595 | 95 | :ID: FD0C4F74-4327-4DA3-B75E-367FB47E4595 |
| 93 | :END: | 96 | :END: |
| 94 | [2015-12-07 Mon 11:06] | 97 | [2015-12-07 Mon 11:06] |
| 95 | [[file:~/Code/enderlabs/mq/eventmq/router.py::return]] | 98 | [[file:~/Code/enderlabs/mq/eventmq/router.py::return]] |
| 96 | *** DONE [#A] automatic recovery for missing broker/schedulers | 99 | **** DONE [#A] automatic recovery for missing broker/schedulers |
| 97 | :PROPERTIES: | 100 | :PROPERTIES: |
| 98 | :ID: 96C5AFF2-10E4-4ADD-926E-A44E31BD0610 | 101 | :ID: 96C5AFF2-10E4-4ADD-926E-A44E31BD0610 |
| 99 | :END: | 102 | :END: |
| 100 | *** DONE [#C] the scheduler should use the monotonic clock to support "run every X" style jobs. | 103 | **** DONE [#C] the scheduler should use the monotonic clock to support "run every X" style jobs. |
| 101 | :PROPERTIES: | 104 | :PROPERTIES: |
| 102 | :ID: 66AD528F-4344-48B1-8701-C0197B57EEC9 | 105 | :ID: 66AD528F-4344-48B1-8701-C0197B57EEC9 |
| 103 | :END: | 106 | :END: |
| 104 | [2015-12-07 Mon 10:09] | 107 | [2015-12-07 Mon 10:09] |
| 105 | [[file:~/Code/enderlabs/mq/eventmq/scheduler.py::for%20i%20in%20range(0,%20len(self.jobs)):][file:~/Code/enderlabs/mq/eventmq/scheduler.py::for i in range(0, len(self.jobs)):]] | 108 | [[file:~/Code/enderlabs/mq/eventmq/scheduler.py::for%20i%20in%20range(0,%20len(self.jobs)):][file:~/Code/enderlabs/mq/eventmq/scheduler.py::for i in range(0, len(self.jobs)):]] |
| 106 | *** DONE [#A] honor the interval SCHEDULE messages into the scheduler | 109 | **** DONE [#A] honor the interval SCHEDULE messages into the scheduler |
| 107 | :PROPERTIES: | 110 | :PROPERTIES: |
| 108 | :ID: 31931D55-626E-4FCA-A4DA-F1C1A9599DD7 | 111 | :ID: 31931D55-626E-4FCA-A4DA-F1C1A9599DD7 |
| 109 | :END: | 112 | :END: |
| 110 | *** DONE [#A] implement scheduler's on_schedule method | 113 | **** DONE [#A] implement scheduler's on_schedule method |
| 111 | :LOGBOOK: | 114 | :LOGBOOK: |
| 112 | CLOCK: [2015-12-30 Wed 15:39]--[2015-12-30 Wed 16:09] => 0:30 | 115 | CLOCK: [2015-12-30 Wed 15:39]--[2015-12-30 Wed 16:09] => 0:30 |
| 113 | :END: | 116 | :END: |
| 114 | *** DONE [#A] add to router forwarding scheduled messages to the scheduler | 117 | **** DONE [#A] add to router forwarding scheduled messages to the scheduler |
| 115 | *** DONE [#A] forward only schedule messages to the scheduler, requests to worker | 118 | **** DONE [#A] forward only schedule messages to the scheduler, requests to worker |
| 116 | *** DONE [#A] add logic to the broker to separate out the scheduler and worker tasks | 119 | **** DONE [#A] add logic to the broker to separate out the scheduler and worker tasks |
| 117 | :PROPERTIES: | 120 | :PROPERTIES: |
| 118 | :ID: B09080F1-AF53-4602-894E-726F4ED3DD3B | 121 | :ID: B09080F1-AF53-4602-894E-726F4ED3DD3B |
| 119 | :END: | 122 | :END: |
| 120 | *** DONE [#C] Refactor common methods for jobmanager and scheduler | 123 | **** DONE [#C] Refactor common methods for jobmanager and scheduler |
| 121 | :LOGBOOK: | 124 | :LOGBOOK: |
| 122 | CLOCK: [2015-12-29 Tue 12:39]--[2015-12-29 Tue 12:46] => 0:07 | 125 | CLOCK: [2015-12-29 Tue 12:39]--[2015-12-29 Tue 12:46] => 0:07 |
| 123 | :END: | 126 | :END: |
| 124 | :PROPERTIES: | 127 | :PROPERTIES: |
| 125 | :ID: 2B6C8141-FE67-4D9F-B6BD-71106189444F | 128 | :ID: 2B6C8141-FE67-4D9F-B6BD-71106189444F |
| 126 | :END: | 129 | :END: |
| 127 | *** DONE when disconnecting on the jobmanager also check that there are no messages in the queue | 130 | **** DONE when disconnecting on the jobmanager also check that there are no messages in the queue |
| 128 | [2015-12-30 Wed 21:11] | 131 | [2015-12-30 Wed 21:11] |
| 129 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/jobmanager.py::if%20len(self.active_jobs)%20>%200:][file:~/Code/enderlabs/eventboard.io/mq/eventmq/jobmanager.py::if len(self.active_jobs) > 0:]] | 132 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/jobmanager.py::if%20len(self.active_jobs)%20>%200:][file:~/Code/enderlabs/eventboard.io/mq/eventmq/jobmanager.py::if len(self.active_jobs) > 0:]] |
| 130 | *** DONE Allow input fields to have author defined validation rules | 133 | **** DONE Allow input fields to have author defined validation rules |
| 131 | :LOGBOOK: | 134 | :LOGBOOK: |
| 132 | CLOCK: [2015-12-17 Thu 09:57]--[2015-12-17 Thu 10:11] => 0:14 | 135 | CLOCK: [2015-12-17 Thu 09:57]--[2015-12-17 Thu 10:11] => 0:14 |
| 133 | :END: | 136 | :END: |
| @@ -137,8 +140,8 @@ CLOCK: [2015-12-17 Thu 09:57]--[2015-12-17 Thu 10:11] => 0:14 | |||
| 137 | :END: | 140 | :END: |
| 138 | [2015-12-17 Thu 09:57] | 141 | [2015-12-17 Thu 09:57] |
| 139 | Lucas has hacked in django form validation to config.json | 142 | Lucas has hacked in django form validation to config.json |
| 140 | *** FIXED The worker is being added to the 'worker' queue | 143 | **** FIXED The worker is being added to the 'worker' queue |
| 141 | *** DONE Define and create the api for setting a job to run on an interval | 144 | **** DONE Define and create the api for setting a job to run on an interval |
| 142 | :LOGBOOK: | 145 | :LOGBOOK: |
| 143 | CLOCK: [2015-12-22 Tue 14:34]--[2015-12-22 Tue 15:03] => 0:29 | 146 | CLOCK: [2015-12-22 Tue 14:34]--[2015-12-22 Tue 15:03] => 0:29 |
| 144 | CLOCK: [2015-12-22 Tue 13:34]--[2015-12-22 Tue 14:34] => 1:00 | 147 | CLOCK: [2015-12-22 Tue 13:34]--[2015-12-22 Tue 14:34] => 1:00 |
| @@ -170,73 +173,73 @@ that the client application can SHOUT that job be stopped. | |||
| 170 | '["run", {"args": [], "class_args": [], "callable": "dumps", "kwargs": {}, | 173 | '["run", {"args": [], "class_args": [], "callable": "dumps", "kwargs": {}, |
| 171 | "path": "json", "class_kwargs": {}}]' | 174 | "path": "json", "class_kwargs": {}}]' |
| 172 | ] | 175 | ] |
| 173 | **** Idea 1 | 176 | ***** Idea 1 |
| 174 | For a task to be scheduled, it must pass a SUBSCRIBE message to the broker. The | 177 | For a task to be scheduled, it must pass a SUBSCRIBE message to the broker. The |
| 175 | broker routes this to the scheduler who caches this information in a file to | 178 | broker routes this to the scheduler who caches this information in a file to |
| 176 | read on startup. | 179 | read on startup. |
| 177 | **** Idea 2 | 180 | ***** Idea 2 |
| 178 | The broker is the maestro, it stores the schedule and which scheduler handles | 181 | The broker is the maestro, it stores the schedule and which scheduler handles |
| 179 | which job. This could help enable scale-planning by reporting load & jobs across | 182 | which job. This could help enable scale-planning by reporting load & jobs across |
| 180 | the schedulers. | 183 | the schedulers. |
| 181 | *** DONE Test that the job manager waits while jobs are still running | 184 | **** DONE Test that the job manager waits while jobs are still running |
| 182 | :LOGBOOK: | 185 | :LOGBOOK: |
| 183 | CLOCK: [2015-12-30 Wed 18:47]--[2015-12-30 Wed 18:48] => 0:01 | 186 | CLOCK: [2015-12-30 Wed 18:47]--[2015-12-30 Wed 18:48] => 0:01 |
| 184 | :END: | 187 | :END: |
| 185 | [2015-12-30 Wed 18:47] | 188 | [2015-12-30 Wed 18:47] |
| 186 | [[file:~/Code/org/eventmq.org::*MEETING%20Review%20the%20onboarding%20process%20(using%20notes)][MEETING Review the onboarding process (using notes)]] | 189 | [[file:~/Code/org/eventmq.org::*MEETING%20Review%20the%20onboarding%20process%20(using%20notes)][MEETING Review the onboarding process (using notes)]] |
| 187 | *** DONE Allow definable available worker slots for jobmanager | 190 | **** DONE Allow definable available worker slots for jobmanager |
| 188 | :LOGBOOK: | 191 | :LOGBOOK: |
| 189 | CLOCK: [2015-12-29 Tue 13:08]--[2015-12-29 Tue 13:09] => 0:01 | 192 | CLOCK: [2015-12-29 Tue 13:08]--[2015-12-29 Tue 13:09] => 0:01 |
| 190 | :END: | 193 | :END: |
| 191 | [2015-12-29 Tue 13:08] | 194 | [2015-12-29 Tue 13:08] |
| 192 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/jobmanager.py::self.send_ready()]] | 195 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/jobmanager.py::self.send_ready()]] |
| 193 | ** 0.3 [0/13] [0%] :milestone: | 196 | *** 0.3 [0/13] [0%] :milestone: |
| 194 | :PROPERTIES: | 197 | :PROPERTIES: |
| 195 | :ID: 75C7D0B7-F856-4F2C-8631-637ADCBB873C | 198 | :ID: 75C7D0B7-F856-4F2C-8631-637ADCBB873C |
| 196 | :END: | 199 | :END: |
| 197 | *** TODO Convert the interval jobs to cron-style, so they can be used in a pinch | 200 | **** TODO Convert the interval jobs to cron-style, so they can be used in a pinch |
| 198 | :PROPERTIES: | 201 | :PROPERTIES: |
| 199 | :ID: 27CCAF1E-D9B8-496F-A4C2-17E0274D3900 | 202 | :ID: 27CCAF1E-D9B8-496F-A4C2-17E0274D3900 |
| 200 | :END: | 203 | :END: |
| 201 | *** TODO add and implement a no-queue header to instruct the broker not to queue a message. | 204 | **** TODO add and implement a no-queue header to instruct the broker not to queue a message. |
| 202 | :PROPERTIES: | 205 | :PROPERTIES: |
| 203 | :ID: D9C4ACCD-4AA2-4228-A4FD-C3B9CAA3B8CD | 206 | :ID: D9C4ACCD-4AA2-4228-A4FD-C3B9CAA3B8CD |
| 204 | :END: | 207 | :END: |
| 205 | *** TODO implement no-queue in the scheduler & SCHEDULE message | 208 | **** TODO implement no-queue in the scheduler & SCHEDULE message |
| 206 | :PROPERTIES: | 209 | :PROPERTIES: |
| 207 | :ID: 63263BEB-08E3-462F-98F5-2A33055C2828 | 210 | :ID: 63263BEB-08E3-462F-98F5-2A33055C2828 |
| 208 | :END: | 211 | :END: |
| 209 | Scheduling a message should be no-queue by default. | 212 | Scheduling a message should be no-queue by default. |
| 210 | Scheduler should in the future, be capable of error handling and making | 213 | Scheduler should in the future, be capable of error handling and making |
| 211 | intelligent decisions about retrying messages just as a client would | 214 | intelligent decisions about retrying messages just as a client would |
| 212 | *** TODO Add some logic to filter some jobs into eventmq for testing. | 215 | **** TODO Add some logic to filter some jobs into eventmq for testing. |
| 213 | :PROPERTIES: | 216 | :PROPERTIES: |
| 214 | :ID: 845EBCE7-0A28-48C2-8137-0B093438789E | 217 | :ID: 845EBCE7-0A28-48C2-8137-0B093438789E |
| 215 | :END: | 218 | :END: |
| 216 | *** TODO allow some of the devices to have a list of addrs so they can automatically connect to backups when primaries go down | 219 | **** TODO allow some of the devices to have a list of addrs so they can automatically connect to backups when primaries go down |
| 217 | :PROPERTIES: | 220 | :PROPERTIES: |
| 218 | :ID: AD07CE78-1196-42A4-A59F-49B53AC1AB12 | 221 | :ID: AD07CE78-1196-42A4-A59F-49B53AC1AB12 |
| 219 | :END: | 222 | :END: |
| 220 | [2015-12-08 Tue 11:09] | 223 | [2015-12-08 Tue 11:09] |
| 221 | [[file:~/Code/enderlabs/mq/eventmq/client/messages.py]] | 224 | [[file:~/Code/enderlabs/mq/eventmq/client/messages.py]] |
| 222 | *** TODO add a HWM threshold config for dropping messages on the broker | 225 | **** TODO add a HWM threshold config for dropping messages on the broker |
| 223 | :PROPERTIES: | 226 | :PROPERTIES: |
| 224 | :ID: AC5F7015-AE5F-4EFF-95D0-48E07164C345 | 227 | :ID: AC5F7015-AE5F-4EFF-95D0-48E07164C345 |
| 225 | :END: | 228 | :END: |
| 226 | [2015-12-07 Mon 10:43] | 229 | [2015-12-07 Mon 10:43] |
| 227 | [[file:~/Code/enderlabs/mq/eventmq/router.py::#%20workers][file:~/Code/enderlabs/mq/eventmq/router.py::# workers]] | 230 | [[file:~/Code/enderlabs/mq/eventmq/router.py::#%20workers][file:~/Code/enderlabs/mq/eventmq/router.py::# workers]] |
| 228 | 231 | ||
| 229 | *** TODO receiver.listen - define exception for not being ready to listen/connect/etc | 232 | **** TODO receiver.listen - define exception for not being ready to listen/connect/etc |
| 230 | :PROPERTIES: | 233 | :PROPERTIES: |
| 231 | :ID: 03230F9A-6A66-40BB-8A6C-E991A2BBFF7B | 234 | :ID: 03230F9A-6A66-40BB-8A6C-E991A2BBFF7B |
| 232 | :END: | 235 | :END: |
| 233 | *** TODO EB; add eventmq to the production.txt requriements somehow. it's private and needs an ssh key currently | 236 | **** TODO EB; add eventmq to the production.txt requriements somehow. it's private and needs an ssh key currently |
| 234 | :PROPERTIES: | 237 | :PROPERTIES: |
| 235 | :ID: 79C5893F-1EC0-4946-8E96-61F2F07FB78B | 238 | :ID: 79C5893F-1EC0-4946-8E96-61F2F07FB78B |
| 236 | :END: | 239 | :END: |
| 237 | [2015-12-07 Mon 15:28] | 240 | [2015-12-07 Mon 15:28] |
| 238 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py]] | 241 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py]] |
| 239 | *** TODO EB INTEGRATIONS sign up for new box.com account to replace oauth2 string. | 242 | **** TODO EB INTEGRATIONS sign up for new box.com account to replace oauth2 string. |
| 240 | :PROPERTIES: | 243 | :PROPERTIES: |
| 241 | :ID: 14A6A422-B048-41FA-B966-81C2213592C3 | 244 | :ID: 14A6A422-B048-41FA-B966-81C2213592C3 |
| 242 | :END: | 245 | :END: |
| @@ -250,7 +253,7 @@ CLOCK: [2015-12-15 Tue 12:57]--[2015-12-15 Tue 13:14] => 0:17 | |||
| 250 | :END: | 253 | :END: |
| 251 | [2015-12-15 Tue 12:57] | 254 | [2015-12-15 Tue 12:57] |
| 252 | Tell will to have the company re-authorize the addon. | 255 | Tell will to have the company re-authorize the addon. |
| 253 | *** TODO Take into account other queues that might have waiting messages when a worker returns from duty | 256 | **** TODO Take into account other queues that might have waiting messages when a worker returns from duty |
| 254 | :PROPERTIES: | 257 | :PROPERTIES: |
| 255 | :ID: 2FE9EB47-97AD-447C-9842-BB59A44BAA5A | 258 | :ID: 2FE9EB47-97AD-447C-9842-BB59A44BAA5A |
| 256 | :END: | 259 | :END: |
| @@ -264,11 +267,11 @@ CLOCK: [2015-12-15 Tue 15:57]--[2015-12-15 Tue 18:45] => 2:48 | |||
| 264 | [[file:~/Code/enderlabs/mq/eventmq/router.py::if%20self.workers%5Bsender%5D%5B'queues'%5D%20in%20self.waiting_messages:][file:~/Code/enderlabs/mq/eventmq/router.py::if | 267 | [[file:~/Code/enderlabs/mq/eventmq/router.py::if%20self.workers%5Bsender%5D%5B'queues'%5D%20in%20self.waiting_messages:][file:~/Code/enderlabs/mq/eventmq/router.py::if |
| 265 | self.workers[sender]['queues'] in self.waiting_messages:]] | 268 | self.workers[sender]['queues'] in self.waiting_messages:]] |
| 266 | 269 | ||
| 267 | *** TODO Fix the log messages so they include things like their own name, and the message id that's being processed | 270 | **** TODO Fix the log messages so they include things like their own name, and the message id that's being processed |
| 268 | :PROPERTIES: | 271 | :PROPERTIES: |
| 269 | :ID: 8647F983-2209-4A23-ABE7-99431B4CA9FF | 272 | :ID: 8647F983-2209-4A23-ABE7-99431B4CA9FF |
| 270 | :END: | 273 | :END: |
| 271 | *** TODO Add logic to end the meeting for longer than the impromptu meeting length if needed | 274 | **** TODO Add logic to end the meeting for longer than the impromptu meeting length if needed |
| 272 | :PROPERTIES: | 275 | :PROPERTIES: |
| 273 | :ID: 4A4EAE0D-AF69-4A19-A96D-102F08B4F7BA | 276 | :ID: 4A4EAE0D-AF69-4A19-A96D-102F08B4F7BA |
| 274 | :END: | 277 | :END: |
| @@ -280,7 +283,7 @@ CLOCK: [2015-12-17 Thu 17:41]--[2015-12-17 Thu 18:25] => 0:44 | |||
| 280 | :END: | 283 | :END: |
| 281 | [2015-12-17 Thu 17:41] | 284 | [2015-12-17 Thu 17:41] |
| 282 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/rw.py::end%3Ddt_last_motion%20%2B%20datetime.timedelta(][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/rw.py::end=dt_last_motion + datetime.timedelta(]] | 285 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/rw.py::end%3Ddt_last_motion%20%2B%20datetime.timedelta(][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/rw.py::end=dt_last_motion + datetime.timedelta(]] |
| 283 | *** TODO User configurable Impromptu event length | 286 | **** TODO User configurable Impromptu event length |
| 284 | :PROPERTIES: | 287 | :PROPERTIES: |
| 285 | :ID: 82B3B512-5B5E-4EC2-8B58-4AC6D80DC52B | 288 | :ID: 82B3B512-5B5E-4EC2-8B58-4AC6D80DC52B |
| 286 | :END: | 289 | :END: |
| @@ -292,11 +295,11 @@ CLOCK: [2015-12-16 Wed 18:09]--[2015-12-16 Wed 18:10] => 0:01 | |||
| 292 | :END: | 295 | :END: |
| 293 | [2015-12-16 Wed 18:09] | 296 | [2015-12-16 Wed 18:09] |
| 294 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/rw.py::ebroom%20%3D%20Room.objects.get(pk%3Dself.room_map%5Broom_name%5D)][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/rw.py::ebroom = Room.objects.get(pk=self.room_map[room_name])]] | 297 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/rw.py::ebroom%20%3D%20Room.objects.get(pk%3Dself.room_map%5Broom_name%5D)][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/rw.py::ebroom = Room.objects.get(pk=self.room_map[room_name])]] |
| 295 | ** 0.4 [0/1] [0%] :milestone: | 298 | *** 0.4 [0/1] [0%] :milestone: |
| 296 | :PROPERTIES: | 299 | :PROPERTIES: |
| 297 | :ID: 51BE0128-D29C-4505-9500-2E29C8BA2F7C | 300 | :ID: 51BE0128-D29C-4505-9500-2E29C8BA2F7C |
| 298 | :END: | 301 | :END: |
| 299 | *** TODO Update MultiProcess worker to use long running processes | 302 | **** TODO Update MultiProcess worker to use long running processes |
| 300 | :PROPERTIES: | 303 | :PROPERTIES: |
| 301 | :ID: 3AF0E4C7-406D-4537-8A9D-880FA5AC3049 | 304 | :ID: 3AF0E4C7-406D-4537-8A9D-880FA5AC3049 |
| 302 | :CREATED: <2015-12-30 Wed 13:19> | 305 | :CREATED: <2015-12-30 Wed 13:19> |
| @@ -305,31 +308,31 @@ Each time a task is run, the entire Django stack is loaded into memory. If the | |||
| 305 | processes were persistent then the loading would only have to happen once. | 308 | processes were persistent then the loading would only have to happen once. |
| 306 | - [ ] When a job changes some setting globally, or loads a model that is cached | 309 | - [ ] When a job changes some setting globally, or loads a model that is cached |
| 307 | how is it cleared so it doesn't poision the task that comes after it? | 310 | how is it cleared so it doesn't poision the task that comes after it? |
| 308 | ** 0.5 [/] [%] :milestone: | 311 | *** 0.5 [/] [%] :milestone: |
| 309 | :PROPERTIES: | 312 | :PROPERTIES: |
| 310 | :ID: FC367F0D-E119-4261-A65E-7955C620C3C6 | 313 | :ID: FC367F0D-E119-4261-A65E-7955C620C3C6 |
| 311 | :END: | 314 | :END: |
| 312 | ** Initiatives | 315 | *** Initiatives |
| 313 | :PROPERTIES: | 316 | :PROPERTIES: |
| 314 | :ID: 7A7C2BE1-A14D-4246-8915-AEC4FF86932C | 317 | :ID: 7A7C2BE1-A14D-4246-8915-AEC4FF86932C |
| 315 | :END: | 318 | :END: |
| 316 | *** Interactive debug mode | 319 | **** Interactive debug mode |
| 317 | :PROPERTIES: | 320 | :PROPERTIES: |
| 318 | :ID: 279381C8-D6EA-41BF-BD2D-B3C1227C2A8B | 321 | :ID: 279381C8-D6EA-41BF-BD2D-B3C1227C2A8B |
| 319 | :END: | 322 | :END: |
| 320 | This is a command line utility (with an interactive mode) that can interact with | 323 | This is a command line utility (with an interactive mode) that can interact with |
| 321 | the devices. Akin to EBTerminal | 324 | the devices. Akin to EBTerminal |
| 322 | **** Tasks [0/2] [0%] | 325 | ***** Tasks [0/2] [0%] |
| 323 | :PROPERTIES: | 326 | :PROPERTIES: |
| 324 | :ID: 6EBD16C1-8A74-48BE-A447-10CFF1F966C1 | 327 | :ID: 6EBD16C1-8A74-48BE-A447-10CFF1F966C1 |
| 325 | :END: | 328 | :END: |
| 326 | ***** TODO TRACE frame in all messages | 329 | ****** TODO TRACE frame in all messages |
| 327 | :PROPERTIES: | 330 | :PROPERTIES: |
| 328 | :ID: DE977097-A6E9-4D2C-8F58-525D6B0E4534 | 331 | :ID: DE977097-A6E9-4D2C-8F58-525D6B0E4534 |
| 329 | :END: | 332 | :END: |
| 330 | This needs to contain some searchable list of values that can be filtered on | 333 | This needs to contain some searchable list of values that can be filtered on |
| 331 | using a trace command. E.g. company_id:139,user_id:4892 | 334 | using a trace command. E.g. company_id:139,user_id:4892 |
| 332 | ***** TODO TRACE command | 335 | ****** TODO TRACE command |
| 333 | :PROPERTIES: | 336 | :PROPERTIES: |
| 334 | :ID: FC38A986-BD17-47D1-991C-B41CB8A2BE16 | 337 | :ID: FC38A986-BD17-47D1-991C-B41CB8A2BE16 |
| 335 | :END: | 338 | :END: |
| @@ -339,27 +342,27 @@ For example, this would display only log messages that pertain to processing | |||
| 339 | messages with a matching trace frame | 342 | messages with a matching trace frame |
| 340 | TRACE | 343 | TRACE |
| 341 | company_id:139 | 344 | company_id:139 |
| 342 | ** Hopper | 345 | *** Hopper |
| 343 | :PROPERTIES: | 346 | :PROPERTIES: |
| 344 | :ID: E51EF95C-4E7A-4697-855B-572A89AC3F00 | 347 | :ID: E51EF95C-4E7A-4697-855B-572A89AC3F00 |
| 345 | :END: | 348 | :END: |
| 346 | *** TODO allow a client to PUBLISH a request for all scheduler's schedules | 349 | **** TODO allow a client to PUBLISH a request for all scheduler's schedules |
| 347 | :PROPERTIES: | 350 | :PROPERTIES: |
| 348 | :ID: CC702374-EFB5-47BB-BAB1-3BB1DBF62684 | 351 | :ID: CC702374-EFB5-47BB-BAB1-3BB1DBF62684 |
| 349 | :END: | 352 | :END: |
| 350 | *** TODO how to add socket to defer_job and allow django to set a socket globally? | 353 | **** TODO how to add socket to defer_job and allow django to set a socket globally? |
| 351 | :PROPERTIES: | 354 | :PROPERTIES: |
| 352 | :ID: 3B53CF21-D99D-44BA-935B-85D1AF2E25E9 | 355 | :ID: 3B53CF21-D99D-44BA-935B-85D1AF2E25E9 |
| 353 | :END: | 356 | :END: |
| 354 | [2015-12-08 Tue 10:29] | 357 | [2015-12-08 Tue 10:29] |
| 355 | [[file:~/Code/enderlabs/mq/eventmq/client/messages.py::}%5D][file:~/Code/enderlabs/mq/eventmq/client/messages.py::}]]] | 358 | [[file:~/Code/enderlabs/mq/eventmq/client/messages.py::}%5D][file:~/Code/enderlabs/mq/eventmq/client/messages.py::}]]] |
| 356 | *** TODO allow the broker to take args specifying queues. | 359 | **** TODO allow the broker to take args specifying queues. |
| 357 | :PROPERTIES: | 360 | :PROPERTIES: |
| 358 | :ID: 8A184188-303E-447C-9199-62265F1A3E10 | 361 | :ID: 8A184188-303E-447C-9199-62265F1A3E10 |
| 359 | :CREATED: <2015-12-30 Wed 13:36> | 362 | :CREATED: <2015-12-30 Wed 13:36> |
| 360 | :END: | 363 | :END: |
| 361 | this will allow messages to be queued by the broker while workers are starting up. | 364 | this will allow messages to be queued by the broker while workers are starting up. |
| 362 | *** TODO Implement a json parser | 365 | **** TODO Implement a json parser |
| 363 | :PROPERTIES: | 366 | :PROPERTIES: |
| 364 | :ID: 8C78C973-DF73-450B-B937-1FD315F1F977 | 367 | :ID: 8C78C973-DF73-450B-B937-1FD315F1F977 |
| 365 | :END: | 368 | :END: |
| @@ -373,18 +376,18 @@ CLOCK: [2015-12-16 Wed 11:07]--[2015-12-16 Wed 11:09] => 0:02 | |||
| 373 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/__init__.py]] | 376 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/__init__.py]] |
| 374 | Reading the data from the buffer would be ideal for organizations with huge | 377 | Reading the data from the buffer would be ideal for organizations with huge |
| 375 | datasets (e.g. Facebook). Version 2.0 should focus on rewriting the logic to do this. | 378 | datasets (e.g. Facebook). Version 2.0 should focus on rewriting the logic to do this. |
| 376 | *** TODO Move version to 0.8 and 0.9 when the analytics and integrations platforms become 1.0 stable | 379 | **** TODO Move version to 0.8 and 0.9 when the analytics and integrations platforms become 1.0 stable |
| 377 | :PROPERTIES: | 380 | :PROPERTIES: |
| 378 | :ID: 9B65290F-F54D-46F3-8E3E-59B80BC9A6A5 | 381 | :ID: 9B65290F-F54D-46F3-8E3E-59B80BC9A6A5 |
| 379 | :END: | 382 | :END: |
| 380 | [2015-12-16 Wed 10:29] | 383 | [2015-12-16 Wed 10:29] |
| 381 | *** TODO how do integrations define 3rd party modules that they require? | 384 | **** TODO how do integrations define 3rd party modules that they require? |
| 382 | :PROPERTIES: | 385 | :PROPERTIES: |
| 383 | :ID: FECB57F0-9283-4174-BC4B-3372C4952600 | 386 | :ID: FECB57F0-9283-4174-BC4B-3372C4952600 |
| 384 | :END: | 387 | :END: |
| 385 | [2015-12-16 Wed 11:17] | 388 | [2015-12-16 Wed 11:17] |
| 386 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/__init__.py::class%20Redwood(PluginBase):][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/__init__.py::class Redwood(PluginBase):]] | 389 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/__init__.py::class%20Redwood(PluginBase):][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/__init__.py::class Redwood(PluginBase):]] |
| 387 | *** TODO Research the linger option in the close. | 390 | **** TODO Research the linger option in the close. |
| 388 | :PROPERTIES: | 391 | :PROPERTIES: |
| 389 | :ID: DA9C1CA7-3256-4DD5-99BF-B4FC3A2FE2BC | 392 | :ID: DA9C1CA7-3256-4DD5-99BF-B4FC3A2FE2BC |
| 390 | :END: | 393 | :END: |
| @@ -397,7 +400,7 @@ CLOCK: [2015-12-15 Tue 19:26]--[2015-12-15 Tue 19:27] => 0:01 | |||
| 397 | [2015-12-15 Tue 19:26] | 400 | [2015-12-15 Tue 19:26] |
| 398 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py::socket.zsocket.close()]] | 401 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py::socket.zsocket.close()]] |
| 399 | Connect and send aren't going to block but the message needs to be sent before the socket is actually closed | 402 | Connect and send aren't going to block but the message needs to be sent before the socket is actually closed |
| 400 | *** TODO there should be intelligent sender id handling on the ROUTER socket provider | 403 | **** TODO there should be intelligent sender id handling on the ROUTER socket provider |
| 401 | :PROPERTIES: | 404 | :PROPERTIES: |
| 402 | :ID: 64FD1C68-8812-4B0A-BACE-FDD38EAF59A7 | 405 | :ID: 64FD1C68-8812-4B0A-BACE-FDD38EAF59A7 |
| 403 | :END: | 406 | :END: |
| @@ -408,19 +411,19 @@ Connect and send aren't going to block but the message needs to be sent before t | |||
| 408 | # mode: org | 411 | # mode: org |
| 409 | # org-todo-keyword-faces: (("ANSWER" . "orange") ("ARCHIVED" . "blue") ("DATE" . "red") ("NEXT" . "#de5577") ("WAITING" . "orange")) | 412 | # org-todo-keyword-faces: (("ANSWER" . "orange") ("ARCHIVED" . "blue") ("DATE" . "red") ("NEXT" . "#de5577") ("WAITING" . "orange")) |
| 410 | # End: | 413 | # End: |
| 411 | *** TODO remove watchtower as a requirement from eventmq | 414 | **** TODO remove watchtower as a requirement from eventmq |
| 412 | :PROPERTIES: | 415 | :PROPERTIES: |
| 413 | :ID: 22234AA6-2566-45CB-96F8-F458FD275521 | 416 | :ID: 22234AA6-2566-45CB-96F8-F458FD275521 |
| 414 | :END: | 417 | :END: |
| 415 | [2015-12-08 Tue 16:03] | 418 | [2015-12-08 Tue 16:03] |
| 416 | [[file:~/Code/enderlabs/mq/eventmq/sender.py]] | 419 | [[file:~/Code/enderlabs/mq/eventmq/sender.py]] |
| 417 | *** TODO convert all the c-style string replacement with .format | 420 | **** TODO convert all the c-style string replacement with .format |
| 418 | :PROPERTIES: | 421 | :PROPERTIES: |
| 419 | :ID: D8298E1B-B7FE-492C-AF10-2095EB31B57B | 422 | :ID: D8298E1B-B7FE-492C-AF10-2095EB31B57B |
| 420 | :END: | 423 | :END: |
| 421 | [2015-12-08 Tue 10:09] | 424 | [2015-12-08 Tue 10:09] |
| 422 | [[file:~/Code/enderlabs/mq/eventmq/client/messages.py::'class_kwargs':%20None][file:~/Code/enderlabs/mq/eventmq/client/messages.py::'class_kwargs': None]] | 425 | [[file:~/Code/enderlabs/mq/eventmq/client/messages.py::'class_kwargs':%20None][file:~/Code/enderlabs/mq/eventmq/client/messages.py::'class_kwargs': None]] |
| 423 | *** TODO plugins should log to their company/plugin so the company can debug :EventMQ 1.0: | 426 | **** TODO plugins should log to their company/plugin so the company can debug :EventMQ 1.0: |
| 424 | :PROPERTIES: | 427 | :PROPERTIES: |
| 425 | :ID: 192A6616-F228-4BD3-8071-6E069809F82F | 428 | :ID: 192A6616-F228-4BD3-8071-6E069809F82F |
| 426 | :END: | 429 | :END: |
| @@ -432,12 +435,12 @@ Connect and send aren't going to block but the message needs to be sent before t | |||
| 432 | [2015-12-14 Mon 14:38] | 435 | [2015-12-14 Mon 14:38] |
| 433 | Before calling it 1.0, the plugin should be putting it's logs somewhere that the | 436 | Before calling it 1.0, the plugin should be putting it's logs somewhere that the |
| 434 | company it's running for can see what it's doing. | 437 | company it's running for can see what it's doing. |
| 435 | *** TODO All Device objects should inherit from a base device class :EventMQ 1.0: | 438 | **** TODO All Device objects should inherit from a base device class :EventMQ 1.0: |
| 436 | :PROPERTIES: | 439 | :PROPERTIES: |
| 437 | :ID: 5670DFCD-6B04-4D31-8D2C-E79C72498291 | 440 | :ID: 5670DFCD-6B04-4D31-8D2C-E79C72498291 |
| 438 | :END: | 441 | :END: |
| 439 | The class should define common things such as `self._meta` | 442 | The class should define common things such as `self._meta` |
| 440 | *** TODO 100% test coverage with some functional tests & benchmarks :EventMQ 1.0: | 443 | **** TODO 100% test coverage with some functional tests & benchmarks :EventMQ 1.0: |
| 441 | :PROPERTIES: | 444 | :PROPERTIES: |
| 442 | :ID: 4C027E33-A368-4E99-B040-C29E552345B9 | 445 | :ID: 4C027E33-A368-4E99-B040-C29E552345B9 |
| 443 | :END: | 446 | :END: |
| @@ -451,7 +454,7 @@ CLOCK: [2015-12-15 Tue 15:22]--[2015-12-15 Tue 15:48] => 0:26 | |||
| 451 | [2015-12-15 Tue 15:22] | 454 | [2015-12-15 Tue 15:22] |
| 452 | [[file:~/Code/enderlabs/mq/eventmq/jobmanager.py::self.poller.unregister(self.incoming)]] | 455 | [[file:~/Code/enderlabs/mq/eventmq/jobmanager.py::self.poller.unregister(self.incoming)]] |
| 453 | 456 | ||
| 454 | *** TODO Target PyCharm as the official plugin creator. | 457 | **** TODO Target PyCharm as the official plugin creator. |
| 455 | :PROPERTIES: | 458 | :PROPERTIES: |
| 456 | :ID: C8124C2E-24CB-4F5B-999E-CB749A253F58 | 459 | :ID: C8124C2E-24CB-4F5B-999E-CB749A253F58 |
| 457 | :END: | 460 | :END: |
| @@ -465,7 +468,7 @@ CLOCK: [2015-12-17 Thu 16:40]--[2015-12-17 Thu 16:54] => 0:14 | |||
| 465 | :END: | 468 | :END: |
| 466 | [2015-12-17 Thu 16:40] | 469 | [2015-12-17 Thu 16:40] |
| 467 | 470 | ||
| 468 | *** TODO Come up with a better plan for redwood's self.save_data/save_settings so the saves are batched | 471 | **** TODO Come up with a better plan for redwood's self.save_data/save_settings so the saves are batched |
| 469 | :PROPERTIES: | 472 | :PROPERTIES: |
| 470 | :ID: 30049D1F-C95B-4DCD-A589-716CBB4878BC | 473 | :ID: 30049D1F-C95B-4DCD-A589-716CBB4878BC |
| 471 | :END: | 474 | :END: |
| @@ -480,7 +483,7 @@ CLOCK: [2015-12-17 Thu 18:25]--[2015-12-17 Thu 18:41] => 0:16 | |||
| 480 | If too many of these show up within the loop, then it's going to slow down | 483 | If too many of these show up within the loop, then it's going to slow down |
| 481 | everything. Add something (at the top of the loop) that checks to see if the | 484 | everything. Add something (at the top of the loop) that checks to see if the |
| 482 | settings/config are dirty, if they are, then save it. | 485 | settings/config are dirty, if they are, then save it. |
| 483 | *** TODO Test for daylight savings time | 486 | **** TODO Test for daylight savings time |
| 484 | :PROPERTIES: | 487 | :PROPERTIES: |
| 485 | :ID: 2CF6F1F5-3291-4E67-9059-076DD210FBEF | 488 | :ID: 2CF6F1F5-3291-4E67-9059-076DD210FBEF |
| 486 | :END: | 489 | :END: |
| @@ -496,14 +499,14 @@ CLOCK: [2015-12-17 Thu 19:54]--[2015-12-18 Fri 11:10] => 15:16 | |||
| 496 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/tests.py::now%20%3D%20int(time.time())][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/tests.py::now = int(time.time())]] | 499 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/tests.py::now%20%3D%20int(time.time())][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/tests.py::now = int(time.time())]] |
| 497 | If Redwood's currentTime is on DST, and we are not (e.g. in the east coast) | 500 | If Redwood's currentTime is on DST, and we are not (e.g. in the east coast) |
| 498 | If we are and Redwood is not (e.g. in the west coast) | 501 | If we are and Redwood is not (e.g. in the west coast) |
| 499 | *** TODO Test-mode with the Django environment warmed up once? | 502 | **** TODO Test-mode with the Django environment warmed up once? |
| 500 | :PROPERTIES: | 503 | :PROPERTIES: |
| 501 | :ID: 6E2CFD3C-7AE4-4B37-866E-BD697F07BC8B | 504 | :ID: 6E2CFD3C-7AE4-4B37-866E-BD697F07BC8B |
| 502 | :END: | 505 | :END: |
| 503 | [2015-12-17 Thu 19:45] | 506 | [2015-12-17 Thu 19:45] |
| 504 | It takes awhile to import all of the modules that we use. If there is a way to | 507 | It takes awhile to import all of the modules that we use. If there is a way to |
| 505 | keep that environment warmed up it should result in a performance increase. | 508 | keep that environment warmed up it should result in a performance increase. |
| 506 | *** TODO Revisit Eventboard vagrant's logging setup. Make it personalizable | 509 | **** TODO Revisit Eventboard vagrant's logging setup. Make it personalizable |
| 507 | :PROPERTIES: | 510 | :PROPERTIES: |
| 508 | :ID: EF74FFEC-098E-4750-9F32-EF55A7579A86 | 511 | :ID: EF74FFEC-098E-4750-9F32-EF55A7579A86 |
| 509 | :END: | 512 | :END: |
| @@ -515,7 +518,7 @@ CLOCK: [2015-12-17 Thu 17:32]--[2015-12-17 Thu 17:33] => 0:01 | |||
| 515 | :END: | 518 | :END: |
| 516 | [2015-12-17 Thu 17:32] | 519 | [2015-12-17 Thu 17:32] |
| 517 | [[file:~/Code/enderlabs/eventboard.io/apps/eventboard/settings/local_settings.py::'level':%20'DEBUG',][file:~/Code/enderlabs/eventboard.io/apps/eventboard/settings/local_settings.py::'level': 'DEBUG',]] | 520 | [[file:~/Code/enderlabs/eventboard.io/apps/eventboard/settings/local_settings.py::'level':%20'DEBUG',][file:~/Code/enderlabs/eventboard.io/apps/eventboard/settings/local_settings.py::'level': 'DEBUG',]] |
| 518 | *** TODO Add a logging level to log raw data for a 'replication/backup/bin?/wal? log'? | 521 | **** TODO Add a logging level to log raw data for a 'replication/backup/bin?/wal? log'? |
| 519 | :PROPERTIES: | 522 | :PROPERTIES: |
| 520 | :ID: 238EDFBB-24A6-4FD8-B434-F2A28B02A41F | 523 | :ID: 238EDFBB-24A6-4FD8-B434-F2A28B02A41F |
| 521 | :END: | 524 | :END: |
| @@ -526,7 +529,7 @@ CLOCK: [2015-12-16 Wed 21:53]--[2015-12-16 Wed 21:54] => 0:01 | |||
| 526 | :ID: F933F84D-1F2C-44AA-9405-363E2CBBEA5D | 529 | :ID: F933F84D-1F2C-44AA-9405-363E2CBBEA5D |
| 527 | :END: | 530 | :END: |
| 528 | [2015-12-16 Wed 21:53] | 531 | [2015-12-16 Wed 21:53] |
| 529 | *** TODO Make eventboard.settings.base_test.py:10 a toggleable option from local_settings | 532 | **** TODO Make eventboard.settings.base_test.py:10 a toggleable option from local_settings |
| 530 | :PROPERTIES: | 533 | :PROPERTIES: |
| 531 | :ID: DC4A957C-FF72-4928-B942-273E7FFF64E8 | 534 | :ID: DC4A957C-FF72-4928-B942-273E7FFF64E8 |
| 532 | :END: | 535 | :END: |
| @@ -538,7 +541,7 @@ CLOCK: [2015-12-16 Wed 20:02]--[2015-12-16 Wed 20:03] => 0:01 | |||
| 538 | :END: | 541 | :END: |
| 539 | [2015-12-16 Wed 20:02] | 542 | [2015-12-16 Wed 20:02] |
| 540 | local_settings should be for developers only. used to tweak the system | 543 | local_settings should be for developers only. used to tweak the system |
| 541 | *** TODO Possibly add back in the lag peice to Redwood. | 544 | **** TODO Possibly add back in the lag peice to Redwood. |
| 542 | :PROPERTIES: | 545 | :PROPERTIES: |
| 543 | :ID: 06DB7F22-56FF-4623-BC79-9B1DFE33B77C | 546 | :ID: 06DB7F22-56FF-4623-BC79-9B1DFE33B77C |
| 544 | :END: | 547 | :END: |
| @@ -554,7 +557,7 @@ Possibly divide the number by 2 to account for the first half of the request | |||
| 554 | where it wasn't that time. | 557 | where it wasn't that time. |
| 555 | Possibly subtract the seconds difference from now() and the reported redwood | 558 | Possibly subtract the seconds difference from now() and the reported redwood |
| 556 | room, assuming the clocks are in sync. ** Document setting this up in Redwood | 559 | room, assuming the clocks are in sync. ** Document setting this up in Redwood |
| 557 | *** TODO Create a test framework for testing all the plugins, including o365 | 560 | **** TODO Create a test framework for testing all the plugins, including o365 |
| 558 | :PROPERTIES: | 561 | :PROPERTIES: |
| 559 | :ID: 52D6BA64-0293-45ED-8B4C-E19DE224EB40 | 562 | :ID: 52D6BA64-0293-45ED-8B4C-E19DE224EB40 |
| 560 | :END: | 563 | :END: |
| @@ -566,13 +569,13 @@ CLOCK: [2015-12-16 Wed 14:26]--[2015-12-16 Wed 14:27] => 0:01 | |||
| 566 | :END: | 569 | :END: |
| 567 | [2015-12-16 Wed 14:26] | 570 | [2015-12-16 Wed 14:26] |
| 568 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/tests.py]] | 571 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/redwood/tests.py]] |
| 569 | *** TODO monitor that the actual processes are serving the content expected on a server, not just that it is up | 572 | **** TODO monitor that the actual processes are serving the content expected on a server, not just that it is up |
| 570 | :PROPERTIES: | 573 | :PROPERTIES: |
| 571 | :ID: C02480E1-8E61-46ED-8416-317EA3006225 | 574 | :ID: C02480E1-8E61-46ED-8416-317EA3006225 |
| 572 | :END: | 575 | :END: |
| 573 | [2015-12-15 Tue 14:15] | 576 | [2015-12-15 Tue 14:15] |
| 574 | 3 of the 5 webservers had frozen or dead gunircorn processes. | 577 | 3 of the 5 webservers had frozen or dead gunircorn processes. |
| 575 | *** TODO Schedule meeting with Insights to ask them how they are using "EVENT_CHANGE" if there are going to be a lot of very specific event_change types. | 578 | **** TODO Schedule meeting with Insights to ask them how they are using "EVENT_CHANGE" if there are going to be a lot of very specific event_change types. |
| 576 | :PROPERTIES: | 579 | :PROPERTIES: |
| 577 | :ID: 4A31C47A-E635-41D1-BEC6-68D6281483EA | 580 | :ID: 4A31C47A-E635-41D1-BEC6-68D6281483EA |
| 578 | :END: | 581 | :END: |
| @@ -583,7 +586,7 @@ CLOCK: [2015-12-22 Tue 11:11]--[2015-12-22 Tue 11:12] => 0:01 | |||
| 583 | They will need to be more or less dynamic without a "Choices" helper otherwise | 586 | They will need to be more or less dynamic without a "Choices" helper otherwise |
| 584 | the data structure is going to get out of hand. The data for the specific types | 587 | the data structure is going to get out of hand. The data for the specific types |
| 585 | should live in their specific implementation (e.g. Redwood_Cancellation)) | 588 | should live in their specific implementation (e.g. Redwood_Cancellation)) |
| 586 | *** TODO Don't silently drop non-ack messages while waiting for an ack at startup. | 589 | **** TODO Don't silently drop non-ack messages while waiting for an ack at startup. |
| 587 | :PROPERTIES: | 590 | :PROPERTIES: |
| 588 | :ID: B7C79866-C7CD-4898-A654-7960EE185046 | 591 | :ID: B7C79866-C7CD-4898-A654-7960EE185046 |
| 589 | :END: | 592 | :END: |
| @@ -594,7 +597,7 @@ CLOCK: [2015-12-29 Tue 12:46]--[2015-12-29 Tue 13:08] => 0:22 | |||
| 594 | [2015-12-29 Tue 12:46] | 597 | [2015-12-29 Tue 12:46] |
| 595 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/utils/classes.py::#%20TODO%20This%20will%20silently%20drop%20messages%20that%20aren't%20ACK][file:~/Code/enderlabs/eventboard.io/mq/eventmq/utils/classes.py::# TODO This will silently drop messages that aren't ACK]] | 598 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/utils/classes.py::#%20TODO%20This%20will%20silently%20drop%20messages%20that%20aren't%20ACK][file:~/Code/enderlabs/eventboard.io/mq/eventmq/utils/classes.py::# TODO This will silently drop messages that aren't ACK]] |
| 596 | 599 | ||
| 597 | *** TODO How to prevent duplicate schedules from being executed? | 600 | **** TODO How to prevent duplicate schedules from being executed? |
| 598 | :PROPERTIES: | 601 | :PROPERTIES: |
| 599 | :ID: E0E19A5F-D230-4F47-AB76-F76FCD07D542 | 602 | :ID: E0E19A5F-D230-4F47-AB76-F76FCD07D542 |
| 600 | :END: | 603 | :END: |
| @@ -607,13 +610,13 @@ CLOCK: [2015-12-30 Wed 21:23]--[2015-12-30 Wed 21:24] => 0:01 | |||
| 607 | if a schedule for the same thing is received more than once, the scheduler will | 610 | if a schedule for the same thing is received more than once, the scheduler will |
| 608 | happily execute all jobs. How can this be prevented in the plugin system. Does | 611 | happily execute all jobs. How can this be prevented in the plugin system. Does |
| 609 | it need prevented in eventmq core? | 612 | it need prevented in eventmq core? |
| 610 | *** TODO !!!! It sounds like they will want to have user plugins, that needs to be accounted for. | 613 | **** TODO !!!! It sounds like they will want to have user plugins, that needs to be accounted for. |
| 611 | :PROPERTIES: | 614 | :PROPERTIES: |
| 612 | :ID: 0D298B52-EDB2-4DFD-A3B8-AF3849A348C1 | 615 | :ID: 0D298B52-EDB2-4DFD-A3B8-AF3849A348C1 |
| 613 | :END: | 616 | :END: |
| 614 | [2015-12-22 Tue 15:17] | 617 | [2015-12-22 Tue 15:17] |
| 615 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py::socket.connect(addr%3D'tcp://127.0.0.1:47290')][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py::socket.connect(addr='tcp://127.0.0.1:47290')]] | 618 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py::socket.connect(addr%3D'tcp://127.0.0.1:47290')][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py::socket.connect(addr='tcp://127.0.0.1:47290')]] |
| 616 | *** TODO the eventboard plugin.hooks.schedule method needs to define some way that the company id can be passed to the plugin. | 619 | **** TODO the eventboard plugin.hooks.schedule method needs to define some way that the company id can be passed to the plugin. |
| 617 | :PROPERTIES: | 620 | :PROPERTIES: |
| 618 | :ID: 2CABD377-FE25-4E9F-870B-A1A22706841B | 621 | :ID: 2CABD377-FE25-4E9F-870B-A1A22706841B |
| 619 | :END: | 622 | :END: |
| @@ -622,18 +625,18 @@ CLOCK: [2015-12-22 Tue 15:11]--[2015-12-22 Tue 15:17] => 0:06 | |||
| 622 | :END: | 625 | :END: |
| 623 | [2015-12-22 Tue 15:11] | 626 | [2015-12-22 Tue 15:11] |
| 624 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py]] | 627 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py]] |
| 625 | *** TODO The new integrations.plugins.hooks.publish hook needs to have a config value specify the broker address | 628 | **** TODO The new integrations.plugins.hooks.publish hook needs to have a config value specify the broker address |
| 626 | :PROPERTIES: | 629 | :PROPERTIES: |
| 627 | :ID: 2A1F725A-6C7B-4D42-9674-CAD6A9D412B1 | 630 | :ID: 2A1F725A-6C7B-4D42-9674-CAD6A9D412B1 |
| 628 | :END: | 631 | :END: |
| 629 | [2015-12-22 Tue 15:06] | 632 | [2015-12-22 Tue 15:06] |
| 630 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py::socket.connect(addr%3D'tcp://127.0.0.1:47290')][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py::socket.connect(addr='tcp://127.0.0.1:47290')]] | 633 | [[file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py::socket.connect(addr%3D'tcp://127.0.0.1:47290')][file:~/Code/enderlabs/eventboard.io/apps/integrations/plugins/hooks.py::socket.connect(addr='tcp://127.0.0.1:47290')]] |
| 631 | *** TODO Last Value Caching. Add an option to send the last value to a connecting worker? | 634 | **** TODO Last Value Caching. Add an option to send the last value to a connecting worker? |
| 632 | :PROPERTIES: | 635 | :PROPERTIES: |
| 633 | :ID: CB99FB3D-4C1B-42AE-BFC6-B0167B806A9D | 636 | :ID: CB99FB3D-4C1B-42AE-BFC6-B0167B806A9D |
| 634 | :END: | 637 | :END: |
| 635 | [2015-12-22 Tue 14:34] | 638 | [2015-12-22 Tue 14:34] |
| 636 | *** TODO When receiving an invalid message from the router, don't just ignore it | 639 | **** TODO When receiving an invalid message from the router, don't just ignore it |
| 637 | :PROPERTIES: | 640 | :PROPERTIES: |
| 638 | :ID: 465B5CA2-8433-4E9D-8975-AF3CFAAFFDF7 | 641 | :ID: 465B5CA2-8433-4E9D-8975-AF3CFAAFFDF7 |
| 639 | :END: | 642 | :END: |
| @@ -642,14 +645,14 @@ CLOCK: [2015-12-29 Tue 13:11]--[2015-12-29 Tue 13:12] => 0:01 | |||
| 642 | :END: | 645 | :END: |
| 643 | [2015-12-29 Tue 13:11] | 646 | [2015-12-29 Tue 13:11] |
| 644 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/utils/classes.py::return]] | 647 | [[file:~/Code/enderlabs/eventboard.io/mq/eventmq/utils/classes.py::return]] |
| 645 | *** TODO Add the ability to shutdown a cluster | 648 | **** TODO Add the ability to shutdown a cluster |
| 646 | The router would send DISCONNECT messages to everything, then it would itself | 649 | The router would send DISCONNECT messages to everything, then it would itself |
| 647 | shutdown. Require and log a reason why the cluster was shutdown | 650 | shutdown. Require and log a reason why the cluster was shutdown |
| 648 | ** Milestone Archive | 651 | *** Milestone Archive |
| 649 | :PROPERTIES: | 652 | :PROPERTIES: |
| 650 | :ID: F993214D-CFAD-49A8-84C5-40BE3B730B58 | 653 | :ID: F993214D-CFAD-49A8-84C5-40BE3B730B58 |
| 651 | :END: | 654 | :END: |
| 652 | *** 0.1 [10/10] [100%] :milestone: | 655 | **** 0.1 [10/10] [100%] :milestone: |
| 653 | :PROPERTIES: | 656 | :PROPERTIES: |
| 654 | :ID: F200B701-97E4-41B4-A6F5-C9529AD224AF | 657 | :ID: F200B701-97E4-41B4-A6F5-C9529AD224AF |
| 655 | :END: | 658 | :END: |
| @@ -682,12 +685,12 @@ defer_job(hello_world, args=("Hello World!",)) | |||
| 682 | 685 | ||
| 683 | You should see Hello World print out in the worker window. | 686 | You should see Hello World print out in the worker window. |
| 684 | 687 | ||
| 685 | **** DONE defer_job function for deferring callable to an external worker. optionally | 688 | ***** DONE defer_job function for deferring callable to an external worker. optionally |
| 686 | :PROPERTIES: | 689 | :PROPERTIES: |
| 687 | :ID: 5A1057CA-3A93-492D-B1BD-5F44A10A843B | 690 | :ID: 5A1057CA-3A93-492D-B1BD-5F44A10A843B |
| 688 | :END: | 691 | :END: |
| 689 | specify class instantiation information (args, kwargs) for methods. | 692 | specify class instantiation information (args, kwargs) for methods. |
| 690 | **** DONE Execute current plugin jobs in worker. | 693 | ***** DONE Execute current plugin jobs in worker. |
| 691 | :LOGBOOK: | 694 | :LOGBOOK: |
| 692 | CLOCK: [2015-12-14 Mon 12:26]--[2015-12-14 Mon 13:00] => 0:34 | 695 | CLOCK: [2015-12-14 Mon 12:26]--[2015-12-14 Mon 13:00] => 0:34 |
| 693 | CLOCK: [2015-12-14 Mon 12:06]--[2015-12-14 Mon 12:17] => 0:11 | 696 | CLOCK: [2015-12-14 Mon 12:06]--[2015-12-14 Mon 12:17] => 0:11 |
| @@ -695,20 +698,20 @@ CLOCK: [2015-12-14 Mon 12:06]--[2015-12-14 Mon 12:17] => 0:11 | |||
| 695 | :PROPERTIES: | 698 | :PROPERTIES: |
| 696 | :ID: 22BE9CA4-6A70-4C69-8775-269098A09E75 | 699 | :ID: 22BE9CA4-6A70-4C69-8775-269098A09E75 |
| 697 | :END: | 700 | :END: |
| 698 | **** DONE The job manager needs to check path for a colon. If one exists instantiate the object | 701 | ***** DONE The job manager needs to check path for a colon. If one exists instantiate the object |
| 699 | :PROPERTIES: | 702 | :PROPERTIES: |
| 700 | :ID: F4CED12E-9FB4-4BBD-96A1-868C10D01AD2 | 703 | :ID: F4CED12E-9FB4-4BBD-96A1-868C10D01AD2 |
| 701 | :END: | 704 | :END: |
| 702 | [2015-12-07 Mon 10:08] | 705 | [2015-12-07 Mon 10:08] |
| 703 | [[file:~/Code/enderlabs/mq/bin/send_msg::'args':%20('arg1',%20'arg2'),][file:~/Code/enderlabs/mq/bin/send_msg::'args': ('arg1', 'arg2'),]] | 706 | [[file:~/Code/enderlabs/mq/bin/send_msg::'args':%20('arg1',%20'arg2'),][file:~/Code/enderlabs/mq/bin/send_msg::'args': ('arg1', 'arg2'),]] |
| 704 | 707 | ||
| 705 | **** DONE import eventmq.client.messages.defer_job so it can be imported via w/ eventmq import defer_job | 708 | ***** DONE import eventmq.client.messages.defer_job so it can be imported via w/ eventmq import defer_job |
| 706 | :PROPERTIES: | 709 | :PROPERTIES: |
| 707 | :ID: D95393F0-5614-472B-B078-AC6138721F5B | 710 | :ID: D95393F0-5614-472B-B078-AC6138721F5B |
| 708 | :END: | 711 | :END: |
| 709 | [2015-12-07 Mon 10:32] | 712 | [2015-12-07 Mon 10:32] |
| 710 | 713 | ||
| 711 | **** FIXED sometimes worker dies on startup | 714 | ***** FIXED sometimes worker dies on startup |
| 712 | :PROPERTIES: | 715 | :PROPERTIES: |
| 713 | :ID: 03D735AC-F1E7-4DD1-8753-8AD20F4D40B3 | 716 | :ID: 03D735AC-F1E7-4DD1-8753-8AD20F4D40B3 |
| 714 | :END: | 717 | :END: |
| @@ -723,7 +726,7 @@ Traceback (most recent call last): | |||
| 723 | self.on_receive_request(msg) | 726 | self.on_receive_request(msg) |
| 724 | File "/Users/jason/Code/enderlabs/mq/eventmq/router.py", line 266, in on_receive_request | 727 | File "/Users/jason/Code/enderlabs/mq/eventmq/router.py", line 266, in on_receive_request |
| 725 | worker_addr = self.queues[queue_name].pop() | 728 | worker_addr = self.queues[queue_name].pop() |
| 726 | **** FIXED Router crashes when fwdmsg to dead worker | 729 | ***** FIXED Router crashes when fwdmsg to dead worker |
| 727 | Updated fwd_emqp_router_message to raise an EventMQError instead of passing the ZMQError upstream | 730 | Updated fwd_emqp_router_message to raise an EventMQError instead of passing the ZMQError upstream |
| 728 | 731 | ||
| 729 | Fixed by catching the exeception and calling the process method recursively | 732 | Fixed by catching the exeception and calling the process method recursively |
| @@ -735,7 +738,7 @@ CLOCK: [2015-12-14 Mon 11:45]--[2015-12-14 Mon 11:49] => 0:04 | |||
| 735 | :PROPERTIES: | 738 | :PROPERTIES: |
| 736 | :ID: 1C45D4E4-4636-413A-ADB1-5C7D3A671AF1 | 739 | :ID: 1C45D4E4-4636-413A-ADB1-5C7D3A671AF1 |
| 737 | :END: | 740 | :END: |
| 738 | ***** Traceback (most recent call last): | 741 | ****** Traceback (most recent call last): |
| 739 | :PROPERTIES: | 742 | :PROPERTIES: |
| 740 | :ID: B36689ED-9B28-4CC9-883F-53D2A8C72E18 | 743 | :ID: B36689ED-9B28-4CC9-883F-53D2A8C72E18 |
| 741 | :END: | 744 | :END: |
| @@ -757,7 +760,7 @@ CLOCK: [2015-12-14 Mon 11:45]--[2015-12-14 Mon 11:49] => 0:04 | |||
| 757 | File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:7535) | 760 | File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc (zmq/backend/cython/socket.c:7535) |
| 758 | zmq.error.ZMQError: No route to host | 761 | zmq.error.ZMQError: No route to host |
| 759 | 762 | ||
| 760 | ***** 2015-12-14 14:11:09,674 - eventmq.router ERROR - No route to host | 763 | ****** 2015-12-14 14:11:09,674 - eventmq.router ERROR - No route to host |
| 761 | :PROPERTIES: | 764 | :PROPERTIES: |
| 762 | :ID: CA47D7CE-6707-43BA-B501-C1BA2CFE70C3 | 765 | :ID: CA47D7CE-6707-43BA-B501-C1BA2CFE70C3 |
| 763 | :END: | 766 | :END: |
| @@ -767,7 +770,7 @@ Traceback (most recent call last): | |||
| 767 | File "/home/vagrant/.virtualenvs/eventboard/local/lib/python2.7/site-packages/eventmq/utils/messages.py", line 155, in fwd_emqp_router_message | 770 | File "/home/vagrant/.virtualenvs/eventboard/local/lib/python2.7/site-packages/eventmq/utils/messages.py", line 155, in fwd_emqp_router_message |
| 768 | raise exceptions.PeerGoneAwayError(e) | 771 | raise exceptions.PeerGoneAwayError(e) |
| 769 | PeerGoneAwayError: No route to host | 772 | PeerGoneAwayError: No route to host |
| 770 | **** DONE [#A] Run the actual functions somewhere else. :jobmanager: | 773 | ***** DONE [#A] Run the actual functions somewhere else. :jobmanager: |
| 771 | :LOGBOOK: | 774 | :LOGBOOK: |
| 772 | CLOCK: [2015-12-15 Tue 12:28]--[2015-12-15 Tue 12:57] => 0:29 | 775 | CLOCK: [2015-12-15 Tue 12:28]--[2015-12-15 Tue 12:57] => 0:29 |
| 773 | :END: | 776 | :END: |
| @@ -777,7 +780,7 @@ CLOCK: [2015-12-15 Tue 12:28]--[2015-12-15 Tue 12:57] => 0:29 | |||
| 777 | [2015-12-07 Mon 14:39] | 780 | [2015-12-07 Mon 14:39] |
| 778 | Doing this will free up the event loop to continue sending heartbeat commands to | 781 | Doing this will free up the event loop to continue sending heartbeat commands to |
| 779 | prevent disconnects. | 782 | prevent disconnects. |
| 780 | **** DONE implement credit-based flow control so job managers spin up a sane number of jobs :jobmanager: | 783 | ***** DONE implement credit-based flow control so job managers spin up a sane number of jobs :jobmanager: |
| 781 | :LOGBOOK: | 784 | :LOGBOOK: |
| 782 | CLOCK: [2015-12-15 Tue 18:58]--[2015-12-15 Tue 20:47] => 1:49 | 785 | CLOCK: [2015-12-15 Tue 18:58]--[2015-12-15 Tue 20:47] => 1:49 |
| 783 | CLOCK: [2015-12-15 Tue 18:45]--[2015-12-15 Tue 18:58] => 0:13 | 786 | CLOCK: [2015-12-15 Tue 18:45]--[2015-12-15 Tue 18:58] => 0:13 |
| @@ -796,14 +799,14 @@ be referred to. | |||
| 796 | workers. | 799 | workers. |
| 797 | - [X] The JobManager should be logging worker output so that the entirety of a | 800 | - [X] The JobManager should be logging worker output so that the entirety of a |
| 798 | message's job can be traced out. | 801 | message's job can be traced out. |
| 799 | **** FIXED When a second worker joins, it is immediatly disconnected from the router :router: | 802 | ***** FIXED When a second worker joins, it is immediatly disconnected from the router :router: |
| 800 | :LOGBOOK: | 803 | :LOGBOOK: |
| 801 | :END: | 804 | :END: |
| 802 | :PROPERTIES: | 805 | :PROPERTIES: |
| 803 | :ID: 5DC671EB-8C37-4DE7-8863-D77494DE4CE9 | 806 | :ID: 5DC671EB-8C37-4DE7-8863-D77494DE4CE9 |
| 804 | :END: | 807 | :END: |
| 805 | [2015-12-14 Mon 15:35] | 808 | [2015-12-14 Mon 15:35] |
| 806 | **** DONE spwan jobs in jobmanager based on message :jobmanager: | 809 | ***** DONE spwan jobs in jobmanager based on message :jobmanager: |
| 807 | :PROPERTIES: | 810 | :PROPERTIES: |
| 808 | :ID: C397FCC8-2AE5-4129-8663-F1B42B7A3CD1 | 811 | :ID: C397FCC8-2AE5-4129-8663-F1B42B7A3CD1 |
| 809 | :END: | 812 | :END: |
diff --git a/docs/protocol.rst b/docs/protocol.rst index a0ab6be..56b02dc 100644 --- a/docs/protocol.rst +++ b/docs/protocol.rst | |||
| @@ -86,7 +86,7 @@ FRAME Value Description | |||
| 86 | 2 PUBLISH command | 86 | 2 PUBLISH command |
| 87 | 3 _MSGID_ A unique id for the msg | 87 | 3 _MSGID_ A unique id for the msg |
| 88 | 4 _TOPIC_NAME_ the name of the queue the worker belongs to | 88 | 4 _TOPIC_NAME_ the name of the queue the worker belongs to |
| 89 | 5 _HEADERS_ dictionary of headers. can be an empty set | 89 | 5 _HEADERS_ csv list of headers |
| 90 | 6 _MSG_ The message to send | 90 | 6 _MSG_ The message to send |
| 91 | ====== ============== =========== | 91 | ====== ============== =========== |
| 92 | 92 | ||
| @@ -99,8 +99,9 @@ FRAME Value Description | |||
| 99 | 1 eMQP/1.0 Protocol version | 99 | 1 eMQP/1.0 Protocol version |
| 100 | 2 SCHEDULE command | 100 | 2 SCHEDULE command |
| 101 | 3 _MSGID_ A unique id for the msg | 101 | 3 _MSGID_ A unique id for the msg |
| 102 | 4 _QUEUE_NAME_ csv seperated names of queue the worker belongs to | 102 | 4 _TOPIC_NAME_ name of queue that the job should run in |
| 103 | 5 _MSG_ The message to send | 103 | 5 _HEADERS_ csv list of headers for this message |
| 104 | 6 _MSG_ The message to send | ||
| 104 | ====== ============== =========== | 105 | ====== ============== =========== |
| 105 | 106 | ||
| 106 | eMQP / Scheduler | 107 | eMQP / Scheduler |
diff --git a/eventmq/client/messages.py b/eventmq/client/messages.py index 801e861..f1afca4 100644 --- a/eventmq/client/messages.py +++ b/eventmq/client/messages.py | |||
| @@ -27,7 +27,8 @@ logger = logging.getLogger(__name__) | |||
| 27 | 27 | ||
| 28 | 28 | ||
| 29 | def schedule(socket, func, interval_mins, args=(), kwargs=None, class_args=(), | 29 | def schedule(socket, func, interval_mins, args=(), kwargs=None, class_args=(), |
| 30 | class_kwargs=None, queue=conf.DEFAULT_QUEUE_NAME): | 30 | class_kwargs=None, headers=('guarantee',), |
| 31 | queue=conf.DEFAULT_QUEUE_NAME): | ||
| 31 | """ | 32 | """ |
| 32 | Execute a task on a defined interval. | 33 | Execute a task on a defined interval. |
| 33 | 34 | ||
| @@ -40,6 +41,8 @@ def schedule(socket, func, interval_mins, args=(), kwargs=None, class_args=(), | |||
| 40 | class_args (list): list of *args to pass to the class (if applicable) | 41 | class_args (list): list of *args to pass to the class (if applicable) |
| 41 | class_kwargs (dict): dict of **kwargs to pass to the class (if | 42 | class_kwargs (dict): dict of **kwargs to pass to the class (if |
| 42 | applicable) | 43 | applicable) |
| 44 | headers (list): list of strings denoting enabled headers. Default: | ||
| 45 | guarantee is enabled to ensure the scheduler schedules the job. | ||
| 43 | queue (str): name of the queue to use when executing the job. The | 46 | queue (str): name of the queue to use when executing the job. The |
| 44 | default value is the default queue. | 47 | default value is the default queue. |
| 45 | """ | 48 | """ |
| @@ -252,7 +255,8 @@ def send_request(socket, message, reply_requested=False, guarantee=False, | |||
| 252 | ) | 255 | ) |
| 253 | 256 | ||
| 254 | 257 | ||
| 255 | def send_schedule_request(socket, interval_secs, message, queue=None): | 258 | def send_schedule_request(socket, interval_secs, message, headers=(), |
| 259 | queue=None): | ||
| 256 | """ | 260 | """ |
| 257 | Send a SCHEDULE command. | 261 | Send a SCHEDULE command. |
| 258 | 262 | ||
| @@ -263,9 +267,12 @@ def send_schedule_request(socket, interval_secs, message, queue=None): | |||
| 263 | socket (socket): | 267 | socket (socket): |
| 264 | interval_secs (int): | 268 | interval_secs (int): |
| 265 | message: Message to send socket. | 269 | message: Message to send socket. |
| 270 | headers (list): List of headers for the message | ||
| 271 | queue (str): name of queue the job should be executed in | ||
| 266 | """ | 272 | """ |
| 267 | send_emqp_message(socket, 'SCHEDULE', | 273 | send_emqp_message(socket, 'SCHEDULE', |
| 268 | (queue or conf.DEFAULT_QUEUE_NAME, | 274 | (queue or conf.DEFAULT_QUEUE_NAME, |
| 275 | ','.join(headers), | ||
| 269 | str(interval_secs), | 276 | str(interval_secs), |
| 270 | serialize(message))) | 277 | serialize(message))) |
| 271 | 278 | ||