Commit ff69c34
committed
Implement poll notifications in core
This commit implements the ability to specify an external command
to run via -pollnotify=<cmd> argument that takes two placeholders,
%s1 and %s2, which are replaced with the poll txid and the
notification status (added, deleted, or expiration_warning).
The notifications are sent on all non-expired polls. Add/delete
notifications are executed by the poll contract handlers. The
expiration warning is handled by a scheduler function which checks
every 5 minutes and does a single shot notification for polls that
are within -pollexpirewarningtime=<hours> of expiration.
This should be sufficient to drive an external script for
notification via email or other desired approach.1 parent 4519201 commit ff69c34
File tree
5 files changed
+127
-1
lines changed- src
- gridcoin
- voting
5 files changed
+127
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
487 | 487 | | |
488 | 488 | | |
489 | 489 | | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
490 | 499 | | |
491 | 500 | | |
492 | 501 | | |
| |||
552 | 561 | | |
553 | 562 | | |
554 | 563 | | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
555 | 568 | | |
556 | 569 | | |
557 | 570 | | |
| |||
615 | 628 | | |
616 | 629 | | |
617 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
49 | 54 | | |
50 | 55 | | |
51 | 56 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| 335 | + | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
| |||
764 | 765 | | |
765 | 766 | | |
766 | 767 | | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
767 | 811 | | |
768 | 812 | | |
769 | 813 | | |
| |||
1064 | 1108 | | |
1065 | 1109 | | |
1066 | 1110 | | |
| 1111 | + | |
| 1112 | + | |
1067 | 1113 | | |
1068 | 1114 | | |
1069 | 1115 | | |
| |||
1142 | 1188 | | |
1143 | 1189 | | |
1144 | 1190 | | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
1145 | 1197 | | |
1146 | 1198 | | |
1147 | 1199 | | |
| |||
1155 | 1207 | | |
1156 | 1208 | | |
1157 | 1209 | | |
1158 | | - | |
1159 | 1210 | | |
1160 | 1211 | | |
1161 | 1212 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
50 | 58 | | |
51 | 59 | | |
52 | 60 | | |
| |||
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
170 | 198 | | |
171 | 199 | | |
172 | 200 | | |
| |||
193 | 221 | | |
194 | 222 | | |
195 | 223 | | |
| 224 | + | |
196 | 225 | | |
197 | 226 | | |
198 | 227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
363 | 369 | | |
364 | 370 | | |
365 | 371 | | |
| |||
0 commit comments